From 42ad95382b01fe7270a0853dce1a0ead0638de10 Mon Sep 17 00:00:00 2001 From: Stefano Fusai <46556949+stefanofusai@users.noreply.github.com> Date: Thu, 4 Jul 2024 20:56:24 +0200 Subject: [PATCH 001/316] =?UTF-8?q?Remove=20`on`=C2=A0from=20API=20docs=20?= =?UTF-8?q?link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f33dc6ecb84..8c3a4ba4bce 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ and offers both synchronous and asynchronous clients powered by [httpx](https:// ## Documentation -The REST API documentation can be found [on developers.cloudflare.com](https://developers.cloudflare.com/api). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [developers.cloudflare.com](https://developers.cloudflare.com/api). The full API of this library can be found in [api.md](api.md). ## Installation From 3d98fba71c65de0c7a215a95fcfb8c7e21f4dd1f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 25 Jun 2024 01:47:57 +0000 Subject: [PATCH 002/316] 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 bfdb542ea02..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-1274668bf5bb40cc6a93aa05b9b1c96050656b905a292bccdb53941f50eaf81e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cfad07b19358cd949055b19f0b3018c59d6d432d441c6ce1f1bfba4fe2ceb344.yml From 1a113b863c9899c61b826a401e03ea9b8c7b30be Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 25 Jun 2024 01:50:21 +0000 Subject: [PATCH 003/316] 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 65dd286b402..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-cfad07b19358cd949055b19f0b3018c59d6d432d441c6ce1f1bfba4fe2ceb344.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1274668bf5bb40cc6a93aa05b9b1c96050656b905a292bccdb53941f50eaf81e.yml From e77f508503d9857420de1e38972557dd9a395745 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 25 Jun 2024 07:55:27 +0000 Subject: [PATCH 004/316] 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 bfdb542ea02..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-1274668bf5bb40cc6a93aa05b9b1c96050656b905a292bccdb53941f50eaf81e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cfad07b19358cd949055b19f0b3018c59d6d432d441c6ce1f1bfba4fe2ceb344.yml From 8fdfff3ee1f2afe06e1c423d7eab5bf3d52ed75e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 07:58:00 +0000 Subject: [PATCH 005/316] feat(api): OpenAPI spec update via Stainless API (#1141) --- .stats.yml | 2 +- src/cloudflare/types/rulesets/rule_create_params.py | 8 ++++++++ src/cloudflare/types/rulesets/rule_edit_params.py | 8 ++++++++ .../types/rulesets/set_cache_settings_rule.py | 10 +++++++++- .../types/rulesets/set_cache_settings_rule_param.py | 10 +++++++++- tests/api_resources/rulesets/test_rules.py | 4 ++++ 6 files changed, 39 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 65dd286b402..13d45ff9b34 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-9d34258411bcff464ef352217f0ededb586dde3de998c001564c021d24420d84.yml diff --git a/src/cloudflare/types/rulesets/rule_create_params.py b/src/cloudflare/types/rulesets/rule_create_params.py index f027d1e1dc5..47c65186555 100644 --- a/src/cloudflare/types/rulesets/rule_create_params.py +++ b/src/cloudflare/types/rulesets/rule_create_params.py @@ -910,6 +910,14 @@ class SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader(TypedDict, tot The presence of these headers is used in building the cache key. """ + contains: Dict[str, List[str]] + """ + For each header name and list of values combination, check if the request header + contains any of the values provided. The presence of the request header and + whether any of the values provided are contained in the request header value is + used in building the cache key. + """ + exclude_origin: bool """Whether or not to include the origin header. diff --git a/src/cloudflare/types/rulesets/rule_edit_params.py b/src/cloudflare/types/rulesets/rule_edit_params.py index 8382c7d8687..5cfda3cca5d 100644 --- a/src/cloudflare/types/rulesets/rule_edit_params.py +++ b/src/cloudflare/types/rulesets/rule_edit_params.py @@ -955,6 +955,14 @@ class SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader(TypedDict, tot The presence of these headers is used in building the cache key. """ + contains: Dict[str, List[str]] + """ + For each header name and list of values combination, check if the request header + contains any of the values provided. The presence of the request header and + whether any of the values provided are contained in the request header value is + used in building the cache key. + """ + exclude_origin: bool """Whether or not to include the origin header. diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule.py b/src/cloudflare/types/rulesets/set_cache_settings_rule.py index caac51356cf..f23b607435f 100644 --- a/src/cloudflare/types/rulesets/set_cache_settings_rule.py +++ b/src/cloudflare/types/rulesets/set_cache_settings_rule.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from datetime import datetime from typing_extensions import Literal @@ -56,6 +56,14 @@ class ActionParametersCacheKeyCustomKeyHeader(BaseModel): The presence of these headers is used in building the cache key. """ + contains: Optional[Dict[str, List[str]]] = None + """ + For each header name and list of values combination, check if the request header + contains any of the values provided. The presence of the request header and + whether any of the values provided are contained in the request header value is + used in building the cache key. + """ + exclude_origin: Optional[bool] = None """Whether or not to include the origin header. diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py index cc507f4b01f..cbfbc5c3a0d 100644 --- a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py +++ b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Dict, List, Iterable from typing_extensions import Literal, Required, TypedDict from .logging_param import LoggingParam @@ -54,6 +54,14 @@ class ActionParametersCacheKeyCustomKeyHeader(TypedDict, total=False): The presence of these headers is used in building the cache key. """ + contains: Dict[str, List[str]] + """ + For each header name and list of values combination, check if the request header + contains any of the values provided. The presence of the request header and + whether any of the values provided are contained in the request header value is + used in building the cache key. + """ + exclude_origin: bool """Whether or not to include the origin header. diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index b457e152f24..090bf6fd02c 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -1196,6 +1196,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> }, "header": { "check_presence": ["string", "string", "string"], + "contains": {"foo": ["string", "string", "string"]}, "exclude_origin": True, "include": ["string", "string", "string"], }, @@ -2998,6 +2999,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No }, "header": { "check_presence": ["string", "string", "string"], + "contains": {"foo": ["string", "string", "string"]}, "exclude_origin": True, "include": ["string", "string", "string"], }, @@ -4579,6 +4581,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy }, "header": { "check_presence": ["string", "string", "string"], + "contains": {"foo": ["string", "string", "string"]}, "exclude_origin": True, "include": ["string", "string", "string"], }, @@ -6381,6 +6384,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async }, "header": { "check_presence": ["string", "string", "string"], + "contains": {"foo": ["string", "string", "string"]}, "exclude_origin": True, "include": ["string", "string", "string"], }, From ba4b02d1c93ff1714176e72127db1e6d5cdee7ae Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 25 Jun 2024 08:59:29 +0000 Subject: [PATCH 006/316] 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 13d45ff9b34..06a57771e4a 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-9d34258411bcff464ef352217f0ededb586dde3de998c001564c021d24420d84.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-021878cf9ab04cd6a19de6a52aa199812210f64af493e6de31c81bd5a3d8d360.yml From 26599d0d1a5109a46bedf0f3ed1f26b4571715a1 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 25 Jun 2024 11:29:54 +0000 Subject: [PATCH 007/316] 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 06a57771e4a..504d673e707 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-021878cf9ab04cd6a19de6a52aa199812210f64af493e6de31c81bd5a3d8d360.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eafb9bced08d72d46f483ae6191e926daa22372c7979d6daf21bc384e0eca4e3.yml From 066164cfd12e65916d4f140c4bb37dfa41649970 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 25 Jun 2024 11:32:27 +0000 Subject: [PATCH 008/316] 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 504d673e707..06a57771e4a 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-eafb9bced08d72d46f483ae6191e926daa22372c7979d6daf21bc384e0eca4e3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-021878cf9ab04cd6a19de6a52aa199812210f64af493e6de31c81bd5a3d8d360.yml From 7dff9119129aa16d971b78aafb7c89553f1e427f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:06:51 +0000 Subject: [PATCH 009/316] feat(api): OpenAPI spec update via Stainless API (#1142) --- .stats.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 06a57771e4a..504d673e707 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-021878cf9ab04cd6a19de6a52aa199812210f64af493e6de31c81bd5a3d8d360.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eafb9bced08d72d46f483ae6191e926daa22372c7979d6daf21bc384e0eca4e3.yml diff --git a/README.md b/README.md index 8c3a4ba4bce..c88029367c0 100644 --- a/README.md +++ b/README.md @@ -351,7 +351,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c - Support for proxies - Custom transports -- Additional [advanced](https://www.python-httpx.org/advanced/#client-instances) functionality +- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality ```python from cloudflare import Cloudflare, DefaultHttpxClient From ce967fbd2d6a60ec41a92e6e02defa34123b266e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 09:32:48 +0000 Subject: [PATCH 010/316] feat(api): OpenAPI spec update via Stainless API (#1143) --- .stats.yml | 2 +- bin/publish-pypi | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 504d673e707..13d45ff9b34 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-eafb9bced08d72d46f483ae6191e926daa22372c7979d6daf21bc384e0eca4e3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9d34258411bcff464ef352217f0ededb586dde3de998c001564c021d24420d84.yml diff --git a/bin/publish-pypi b/bin/publish-pypi index 826054e9248..05bfccbb71e 100644 --- a/bin/publish-pypi +++ b/bin/publish-pypi @@ -3,4 +3,7 @@ set -eux mkdir -p dist rye build --clean +# Patching importlib-metadata version until upstream library version is updated +# https://github.com/pypa/twine/issues/977#issuecomment-2189800841 +"$HOME/.rye/self/bin/python3" -m pip install 'importlib-metadata==7.2.1' rye publish --yes --token=$PYPI_TOKEN From fced90539303bf3a0cc2cd8144b999405dae9528 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 26 Jun 2024 09:37:51 +0000 Subject: [PATCH 011/316] 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 13d45ff9b34..504d673e707 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-9d34258411bcff464ef352217f0ededb586dde3de998c001564c021d24420d84.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eafb9bced08d72d46f483ae6191e926daa22372c7979d6daf21bc384e0eca4e3.yml From 0831d037d9eb03a6fb0cc3ca81b5b88dc5c50089 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 13:11:21 +0000 Subject: [PATCH 012/316] feat(api): OpenAPI spec update via Stainless API (#1144) --- .stats.yml | 2 +- src/cloudflare/resources/workers/ai/ai.py | 96 +++---------- src/cloudflare/types/workers/ai_run_params.py | 18 ++- .../types/workers/ai_run_response.py | 14 +- tests/api_resources/workers/test_ai.py | 126 ++++++++---------- 5 files changed, 96 insertions(+), 160 deletions(-) diff --git a/.stats.yml b/.stats.yml index 504d673e707..72dd24c9531 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-eafb9bced08d72d46f483ae6191e926daa22372c7979d6daf21bc384e0eca4e3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cd837fea75977564d3cf39f8e1799785f77785a6fcc538d9c2471156a6d309b1.yml diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index 86d294ec5fa..c92feba6e64 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -58,7 +58,7 @@ def run( model_name: str, *, account_id: str, - text: 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, @@ -94,12 +94,7 @@ def run( model_name: str, *, account_id: str, - prompt: str, - guidance: float | NotGiven = NOT_GIVEN, - image: Iterable[float] | NotGiven = NOT_GIVEN, - mask: Iterable[float] | NotGiven = NOT_GIVEN, - num_steps: int | NotGiven = NOT_GIVEN, - strength: float | NotGiven = NOT_GIVEN, + text: 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, @@ -135,8 +130,12 @@ def run( model_name: str, *, account_id: str, - sentences: List[str], - source: str, + prompt: str, + guidance: float | NotGiven = NOT_GIVEN, + image: Iterable[float] | NotGiven = NOT_GIVEN, + mask: Iterable[float] | NotGiven = NOT_GIVEN, + num_steps: int | NotGiven = NOT_GIVEN, + strength: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -468,9 +467,9 @@ def run( ... @required_args( + ["account_id", "body"], ["account_id", "text"], ["account_id", "prompt"], - ["account_id", "sentences", "source"], ["account_id", "audio"], ["account_id", "image"], ["account_id"], @@ -482,6 +481,7 @@ def run( model_name: str, *, account_id: str, + body: object | NotGiven = NOT_GIVEN, text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, @@ -489,8 +489,6 @@ def run( mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, - sentences: List[str] | NotGiven = NOT_GIVEN, - source: str | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, @@ -517,31 +515,7 @@ def run( Optional[AIRunResponse], self._post( f"/accounts/{account_id}/ai/run/{model_name}", - body=maybe_transform( - { - "text": text, - "prompt": prompt, - "guidance": guidance, - "image": image, - "mask": mask, - "num_steps": num_steps, - "strength": strength, - "sentences": sentences, - "source": source, - "audio": audio, - "lora": lora, - "max_tokens": max_tokens, - "messages": messages, - "raw": raw, - "stream": stream, - "target_lang": target_lang, - "source_lang": source_lang, - "input_text": input_text, - "max_length": max_length, - "temperature": temperature, - }, - ai_run_params.AIRunParams, - ), + body=maybe_transform(body, ai_run_params.AIRunParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -575,7 +549,7 @@ async def run( model_name: str, *, account_id: str, - text: 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, @@ -611,12 +585,7 @@ async def run( model_name: str, *, account_id: str, - prompt: str, - guidance: float | NotGiven = NOT_GIVEN, - image: Iterable[float] | NotGiven = NOT_GIVEN, - mask: Iterable[float] | NotGiven = NOT_GIVEN, - num_steps: int | NotGiven = NOT_GIVEN, - strength: float | NotGiven = NOT_GIVEN, + text: 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, @@ -652,8 +621,12 @@ async def run( model_name: str, *, account_id: str, - sentences: List[str], - source: str, + prompt: str, + guidance: float | NotGiven = NOT_GIVEN, + image: Iterable[float] | NotGiven = NOT_GIVEN, + mask: Iterable[float] | NotGiven = NOT_GIVEN, + num_steps: int | NotGiven = NOT_GIVEN, + strength: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -985,9 +958,9 @@ async def run( ... @required_args( + ["account_id", "body"], ["account_id", "text"], ["account_id", "prompt"], - ["account_id", "sentences", "source"], ["account_id", "audio"], ["account_id", "image"], ["account_id"], @@ -999,6 +972,7 @@ async def run( model_name: str, *, account_id: str, + body: object | NotGiven = NOT_GIVEN, text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, @@ -1006,8 +980,6 @@ async def run( mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, - sentences: List[str] | NotGiven = NOT_GIVEN, - source: str | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, @@ -1034,31 +1006,7 @@ async def run( Optional[AIRunResponse], await self._post( f"/accounts/{account_id}/ai/run/{model_name}", - body=await async_maybe_transform( - { - "text": text, - "prompt": prompt, - "guidance": guidance, - "image": image, - "mask": mask, - "num_steps": num_steps, - "strength": strength, - "sentences": sentences, - "source": source, - "audio": audio, - "lora": lora, - "max_tokens": max_tokens, - "messages": messages, - "raw": raw, - "stream": stream, - "target_lang": target_lang, - "source_lang": source_lang, - "input_text": input_text, - "max_length": max_length, - "temperature": temperature, - }, - ai_run_params.AIRunParams, - ), + body=await async_maybe_transform(body, ai_run_params.AIRunParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index b06bf72cc7a..8a9b8fd1739 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -7,9 +7,9 @@ __all__ = [ "AIRunParams", + "DumbPipe", "TextClassification", "TextToImage", - "SentenceSimilarity", "TextEmbeddings", "SpeechRecognition", "ImageClassification", @@ -23,6 +23,12 @@ ] +class DumbPipe(TypedDict, total=False): + account_id: Required[str] + + body: Required[object] + + class TextClassification(TypedDict, total=False): account_id: Required[str] @@ -45,14 +51,6 @@ class TextToImage(TypedDict, total=False): strength: float -class SentenceSimilarity(TypedDict, total=False): - account_id: Required[str] - - sentences: Required[List[str]] - - source: Required[str] - - class TextEmbeddings(TypedDict, total=False): account_id: Required[str] @@ -140,9 +138,9 @@ class ImageToTextMessage(TypedDict, total=False): AIRunParams = Union[ + DumbPipe, TextClassification, TextToImage, - SentenceSimilarity, TextEmbeddings, SpeechRecognition, ImageClassification, diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 87644ee64f6..183a54eab1c 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -13,8 +13,8 @@ "ImageClassification", "ObjectDetection", "ObjectDetectionBox", - "UnionMember7", - "UnionMember7ToolCall", + "UnionMember6", + "UnionMember6ToolCall", "Translation", "Summarization", "ImageToText", @@ -75,16 +75,16 @@ class ObjectDetection(BaseModel): score: Optional[float] = None -class UnionMember7ToolCall(BaseModel): +class UnionMember6ToolCall(BaseModel): arguments: Optional[object] = None name: Optional[str] = None -class UnionMember7(BaseModel): +class UnionMember6(BaseModel): response: Optional[str] = None - tool_calls: Optional[List[UnionMember7ToolCall]] = None + tool_calls: Optional[List[UnionMember6ToolCall]] = None class Translation(BaseModel): @@ -102,14 +102,14 @@ class ImageToText(BaseModel): AIRunResponse = Union[ List[TextClassification], object, - List[float], TextEmbeddings, SpeechRecognition, List[ImageClassification], List[ObjectDetection], - UnionMember7, + UnionMember6, object, Translation, Summarization, ImageToText, + object, ] diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index 80da34bc005..14ba8b90bbe 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -22,7 +22,7 @@ def test_method_run_overload_1(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -31,7 +31,7 @@ def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) assert response.is_closed is True @@ -44,7 +44,7 @@ def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,14 +60,14 @@ def test_path_params_run_overload_1(self, client: Cloudflare) -> None: client.workers.ai.with_raw_response.run( "string", account_id="", - text="x", + body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) @parametrize @@ -75,21 +75,7 @@ def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - def test_method_run_with_all_params_overload_2(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - guidance=0, - image=[0, 0, 0], - mask=[0, 0, 0], - num_steps=0, - strength=0, + text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -98,7 +84,7 @@ def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", + text="x", ) assert response.is_closed is True @@ -111,7 +97,7 @@ def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", + text="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -127,14 +113,14 @@ def test_path_params_run_overload_2(self, client: Cloudflare) -> None: client.workers.ai.with_raw_response.run( "string", account_id="", - prompt="x", + text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", + text="x", ) @parametrize @@ -142,8 +128,21 @@ def test_method_run_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None: + ai = client.workers.ai.run( + "string", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + guidance=0, + image=[0, 0, 0], + mask=[0, 0, 0], + num_steps=0, + strength=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -152,8 +151,7 @@ def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) assert response.is_closed is True @@ -166,8 +164,7 @@ def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -183,16 +180,14 @@ def test_path_params_run_overload_3(self, client: Cloudflare) -> None: client.workers.ai.with_raw_response.run( "string", account_id="", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) @parametrize @@ -707,7 +702,7 @@ async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> Non ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -716,7 +711,7 @@ async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) assert response.is_closed is True @@ -729,7 +724,7 @@ async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudf async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -745,14 +740,14 @@ async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) - await async_client.workers.ai.with_raw_response.run( "string", account_id="", - text="x", + body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", + body={}, ) @parametrize @@ -760,21 +755,7 @@ async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> Non ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - guidance=0, - image=[0, 0, 0], - mask=[0, 0, 0], - num_steps=0, - strength=0, + text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -783,7 +764,7 @@ async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", + text="x", ) assert response.is_closed is True @@ -796,7 +777,7 @@ async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudf async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", + text="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -812,14 +793,14 @@ async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) - await async_client.workers.ai.with_raw_response.run( "string", account_id="", - prompt="x", + text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", + text="x", ) @parametrize @@ -827,8 +808,21 @@ async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> Non ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: + ai = await async_client.workers.ai.run( + "string", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + guidance=0, + image=[0, 0, 0], + mask=[0, 0, 0], + num_steps=0, + strength=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -837,8 +831,7 @@ async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) assert response.is_closed is True @@ -851,8 +844,7 @@ async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudf async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -868,16 +860,14 @@ async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) - await async_client.workers.ai.with_raw_response.run( "string", account_id="", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", + prompt="x", ) @parametrize From 6114ff462e5dd41162d2fa8fb417e42a79c9fc4f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 26 Jun 2024 13:48:26 +0000 Subject: [PATCH 013/316] 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 72dd24c9531..aba18402c03 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-cd837fea75977564d3cf39f8e1799785f77785a6fcc538d9c2471156a6d309b1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-859d3e6d121c52437cb08efd99ba8557b07e3b076be48917ef6b25885b7a5615.yml From ea3c6dc3a3c582b40806db9a811d41ec5574d190 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 26 Jun 2024 13:53:26 +0000 Subject: [PATCH 014/316] 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 aba18402c03..72dd24c9531 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-859d3e6d121c52437cb08efd99ba8557b07e3b076be48917ef6b25885b7a5615.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cd837fea75977564d3cf39f8e1799785f77785a6fcc538d9c2471156a6d309b1.yml From c4f5a69ca8bdb01cac989765e570fa51faa2c534 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:37:43 +0000 Subject: [PATCH 015/316] feat(api): OpenAPI spec update via Stainless API (#1145) --- .stats.yml | 4 +- api.md | 244 --- .../resources/zones/settings/__init__.py | 686 ------- .../resources/zones/settings/advanced_ddos.py | 162 -- .../resources/zones/settings/always_online.py | 278 --- .../zones/settings/always_use_https.py | 270 --- .../settings/automatic_https_rewrites.py | 266 --- .../automatic_platform_optimization.py | 270 --- .../resources/zones/settings/brotli.py | 266 --- .../zones/settings/browser_cache_ttl.py | 334 ---- .../resources/zones/settings/browser_check.py | 278 --- .../resources/zones/settings/cache_level.py | 282 --- .../resources/zones/settings/challenge_ttl.py | 278 --- .../resources/zones/settings/ciphers.py | 261 --- .../zones/settings/development_mode.py | 282 --- .../resources/zones/settings/early_hints.py | 274 --- .../zones/settings/email_obfuscation.py | 268 --- .../zones/settings/h2_prioritization.py | 268 --- .../zones/settings/hotlink_protection.py | 288 --- .../resources/zones/settings/http2.py | 262 --- .../resources/zones/settings/http3.py | 262 --- .../zones/settings/image_resizing.py | 280 --- .../zones/settings/ip_geolocation.py | 270 --- .../resources/zones/settings/ipv6.py | 266 --- .../zones/settings/min_tls_version.py | 262 --- .../resources/zones/settings/minify.py | 273 --- .../resources/zones/settings/mirage.py | 274 --- .../zones/settings/mobile_redirect.py | 273 --- .../resources/zones/settings/nel.py | 268 --- .../settings/opportunistic_encryption.py | 268 --- .../zones/settings/opportunistic_onion.py | 270 --- .../zones/settings/orange_to_orange.py | 268 --- .../settings/origin_error_page_pass_thru.py | 274 --- .../resources/zones/settings/polish.py | 280 --- .../zones/settings/prefetch_preload.py | 266 --- .../zones/settings/proxy_read_timeout.py | 264 --- .../resources/zones/settings/pseudo_ipv4.py | 262 --- .../zones/settings/response_buffering.py | 280 --- .../resources/zones/settings/rocket_loader.py | 316 ---- .../zones/settings/security_headers.py | 257 --- .../zones/settings/security_level.py | 274 --- .../zones/settings/server_side_excludes.py | 304 --- .../resources/zones/settings/settings.py | 1632 +---------------- .../settings/sort_query_string_for_cache.py | 274 --- .../resources/zones/settings/ssl.py | 322 ---- .../zones/settings/ssl_recommender.py | 274 --- .../resources/zones/settings/tls_1_3.py | 264 --- .../zones/settings/tls_client_auth.py | 266 --- .../zones/settings/true_client_ip_header.py | 268 --- .../resources/zones/settings/waf.py | 302 --- .../resources/zones/settings/webp.py | 270 --- .../resources/zones/settings/websocket.py | 272 --- .../resources/zones/settings/zero_rtt.py | 262 --- .../types/zones/settings/__init__.py | 114 -- .../settings/always_online_edit_params.py | 15 - .../settings/always_use_https_edit_params.py | 15 - .../automatic_https_rewrite_edit_params.py | 18 - ...matic_platform_optimization_edit_params.py | 16 - .../automatic_platform_optimization_param.py | 39 - .../zones/settings/brotli_edit_params.py | 15 - .../settings/browser_cache_ttl_edit_params.py | 49 - .../settings/browser_check_edit_params.py | 15 - .../zones/settings/cache_level_edit_params.py | 15 - .../settings/challenge_ttl_edit_params.py | 17 - .../zones/settings/cipher_edit_params.py | 16 - .../settings/development_mode_edit_params.py | 15 - .../zones/settings/early_hint_edit_params.py | 15 - .../settings/email_obfuscation_edit_params.py | 15 - .../settings/h2_prioritization_edit_params.py | 21 - .../zones/settings/h2_prioritization_param.py | 15 - .../hotlink_protection_edit_params.py | 15 - .../types/zones/settings/http2_edit_params.py | 15 - .../types/zones/settings/http3_edit_params.py | 15 - .../settings/image_resizing_edit_params.py | 22 - .../zones/settings/image_resizing_param.py | 15 - .../settings/ip_geolocation_edit_params.py | 15 - .../types/zones/settings/ipv6_edit_params.py | 15 - .../settings/min_tls_version_edit_params.py | 15 - .../zones/settings/minify_edit_params.py | 26 - .../zones/settings/mirage_edit_params.py | 15 - .../types/zones/settings/mobile_redirect.py | 6 +- .../settings/mobile_redirect_edit_params.py | 33 - .../types/zones/settings/nel_edit_params.py | 17 - .../types/zones/settings/nel_param.py | 19 - .../opportunistic_encryption_edit_params.py | 18 - .../opportunistic_onion_edit_params.py | 18 - .../settings/orange_to_orange_edit_params.py | 20 - .../zones/settings/orange_to_orange_param.py | 15 - ...origin_error_page_pass_thru_edit_params.py | 15 - .../zones/settings/polish_edit_params.py | 24 - .../types/zones/settings/polish_param.py | 15 - .../settings/prefetch_preload_edit_params.py | 15 - .../proxy_read_timeout_edit_params.py | 17 - .../settings/proxy_read_timeout_param.py | 15 - .../zones/settings/pseudo_ipv4_edit_params.py | 15 - .../response_buffering_edit_params.py | 15 - .../settings/rocket_loader_edit_params.py | 28 - .../zones/settings/rocket_loader_param.py | 15 - .../settings/security_header_edit_params.py | 33 - .../settings/security_level_edit_params.py | 15 - .../server_side_exclude_edit_params.py | 15 - ...sort_query_string_for_cache_edit_params.py | 15 - .../types/zones/settings/ssl_edit_params.py | 15 - .../settings/ssl_recommender_edit_params.py | 21 - .../zones/settings/ssl_recommender_param.py | 15 - .../zones/settings/tls_1_3_edit_params.py | 18 - .../settings/tls_client_auth_edit_params.py | 15 - .../true_client_ip_header_edit_params.py | 15 - .../types/zones/settings/waf_edit_params.py | 15 - .../types/zones/settings/webp_edit_params.py | 15 - .../zones/settings/websocket_edit_params.py | 15 - .../zones/settings/zero_rtt_edit_params.py | 15 - .../zones/settings/test_advanced_ddos.py | 98 - .../zones/settings/test_always_online.py | 182 -- .../zones/settings/test_always_use_https.py | 182 -- .../settings/test_automatic_https_rewrites.py | 182 -- .../test_automatic_platform_optimization.py | 246 --- .../zones/settings/test_brotli.py | 182 -- .../zones/settings/test_browser_cache_ttl.py | 182 -- .../zones/settings/test_browser_check.py | 182 -- .../zones/settings/test_cache_level.py | 182 -- .../zones/settings/test_challenge_ttl.py | 182 -- .../zones/settings/test_ciphers.py | 182 -- .../zones/settings/test_development_mode.py | 182 -- .../zones/settings/test_early_hints.py | 182 -- .../zones/settings/test_email_obfuscation.py | 182 -- .../zones/settings/test_h2_prioritization.py | 228 --- .../zones/settings/test_hotlink_protection.py | 182 -- .../zones/settings/test_http2.py | 182 -- .../zones/settings/test_http3.py | 182 -- .../zones/settings/test_image_resizing.py | 228 --- .../zones/settings/test_ip_geolocation.py | 182 -- .../api_resources/zones/settings/test_ipv6.py | 182 -- .../zones/settings/test_min_tls_version.py | 182 -- .../zones/settings/test_minify.py | 206 --- .../zones/settings/test_mirage.py | 182 -- .../zones/settings/test_mobile_redirect.py | 206 --- .../api_resources/zones/settings/test_nel.py | 228 --- .../settings/test_opportunistic_encryption.py | 182 -- .../settings/test_opportunistic_onion.py | 182 -- .../zones/settings/test_orange_to_orange.py | 228 --- .../test_origin_error_page_pass_thru.py | 182 -- .../zones/settings/test_polish.py | 228 --- .../zones/settings/test_prefetch_preload.py | 182 -- .../zones/settings/test_proxy_read_timeout.py | 228 --- .../zones/settings/test_pseudo_ipv4.py | 182 -- .../zones/settings/test_response_buffering.py | 182 -- .../zones/settings/test_rocket_loader.py | 228 --- .../zones/settings/test_security_headers.py | 212 --- .../zones/settings/test_security_level.py | 182 -- .../settings/test_server_side_excludes.py | 182 -- .../test_sort_query_string_for_cache.py | 182 -- .../api_resources/zones/settings/test_ssl.py | 182 -- .../zones/settings/test_ssl_recommender.py | 204 --- .../zones/settings/test_tls_1_3.py | 182 -- .../zones/settings/test_tls_client_auth.py | 182 -- .../settings/test_true_client_ip_header.py | 182 -- .../api_resources/zones/settings/test_waf.py | 182 -- .../api_resources/zones/settings/test_webp.py | 182 -- .../zones/settings/test_websocket.py | 182 -- .../zones/settings/test_zero_rtt.py | 182 -- 161 files changed, 37 insertions(+), 26371 deletions(-) delete mode 100644 src/cloudflare/resources/zones/settings/advanced_ddos.py delete mode 100644 src/cloudflare/resources/zones/settings/always_online.py delete mode 100644 src/cloudflare/resources/zones/settings/always_use_https.py delete mode 100644 src/cloudflare/resources/zones/settings/automatic_https_rewrites.py delete mode 100644 src/cloudflare/resources/zones/settings/automatic_platform_optimization.py delete mode 100644 src/cloudflare/resources/zones/settings/brotli.py delete mode 100644 src/cloudflare/resources/zones/settings/browser_cache_ttl.py delete mode 100644 src/cloudflare/resources/zones/settings/browser_check.py delete mode 100644 src/cloudflare/resources/zones/settings/cache_level.py delete mode 100644 src/cloudflare/resources/zones/settings/challenge_ttl.py delete mode 100644 src/cloudflare/resources/zones/settings/ciphers.py delete mode 100644 src/cloudflare/resources/zones/settings/development_mode.py delete mode 100644 src/cloudflare/resources/zones/settings/early_hints.py delete mode 100644 src/cloudflare/resources/zones/settings/email_obfuscation.py delete mode 100644 src/cloudflare/resources/zones/settings/h2_prioritization.py delete mode 100644 src/cloudflare/resources/zones/settings/hotlink_protection.py delete mode 100644 src/cloudflare/resources/zones/settings/http2.py delete mode 100644 src/cloudflare/resources/zones/settings/http3.py delete mode 100644 src/cloudflare/resources/zones/settings/image_resizing.py delete mode 100644 src/cloudflare/resources/zones/settings/ip_geolocation.py delete mode 100644 src/cloudflare/resources/zones/settings/ipv6.py delete mode 100644 src/cloudflare/resources/zones/settings/min_tls_version.py delete mode 100644 src/cloudflare/resources/zones/settings/minify.py delete mode 100644 src/cloudflare/resources/zones/settings/mirage.py delete mode 100644 src/cloudflare/resources/zones/settings/mobile_redirect.py delete mode 100644 src/cloudflare/resources/zones/settings/nel.py delete mode 100644 src/cloudflare/resources/zones/settings/opportunistic_encryption.py delete mode 100644 src/cloudflare/resources/zones/settings/opportunistic_onion.py delete mode 100644 src/cloudflare/resources/zones/settings/orange_to_orange.py delete mode 100644 src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py delete mode 100644 src/cloudflare/resources/zones/settings/polish.py delete mode 100644 src/cloudflare/resources/zones/settings/prefetch_preload.py delete mode 100644 src/cloudflare/resources/zones/settings/proxy_read_timeout.py delete mode 100644 src/cloudflare/resources/zones/settings/pseudo_ipv4.py delete mode 100644 src/cloudflare/resources/zones/settings/response_buffering.py delete mode 100644 src/cloudflare/resources/zones/settings/rocket_loader.py delete mode 100644 src/cloudflare/resources/zones/settings/security_headers.py delete mode 100644 src/cloudflare/resources/zones/settings/security_level.py delete mode 100644 src/cloudflare/resources/zones/settings/server_side_excludes.py delete mode 100644 src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py delete mode 100644 src/cloudflare/resources/zones/settings/ssl.py delete mode 100644 src/cloudflare/resources/zones/settings/ssl_recommender.py delete mode 100644 src/cloudflare/resources/zones/settings/tls_1_3.py delete mode 100644 src/cloudflare/resources/zones/settings/tls_client_auth.py delete mode 100644 src/cloudflare/resources/zones/settings/true_client_ip_header.py delete mode 100644 src/cloudflare/resources/zones/settings/waf.py delete mode 100644 src/cloudflare/resources/zones/settings/webp.py delete mode 100644 src/cloudflare/resources/zones/settings/websocket.py delete mode 100644 src/cloudflare/resources/zones/settings/zero_rtt.py delete mode 100644 src/cloudflare/types/zones/settings/always_online_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/always_use_https_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/automatic_platform_optimization_param.py delete mode 100644 src/cloudflare/types/zones/settings/brotli_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/browser_cache_ttl_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/browser_check_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/cache_level_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/challenge_ttl_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/cipher_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/development_mode_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/early_hint_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/email_obfuscation_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/h2_prioritization_param.py delete mode 100644 src/cloudflare/types/zones/settings/hotlink_protection_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/http2_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/http3_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/image_resizing_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/image_resizing_param.py delete mode 100644 src/cloudflare/types/zones/settings/ip_geolocation_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/ipv6_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/min_tls_version_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/minify_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/mirage_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/mobile_redirect_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/nel_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/nel_param.py delete mode 100644 src/cloudflare/types/zones/settings/opportunistic_encryption_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/opportunistic_onion_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/orange_to_orange_param.py delete mode 100644 src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/polish_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/polish_param.py delete mode 100644 src/cloudflare/types/zones/settings/prefetch_preload_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/proxy_read_timeout_param.py delete mode 100644 src/cloudflare/types/zones/settings/pseudo_ipv4_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/response_buffering_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/rocket_loader_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/rocket_loader_param.py delete mode 100644 src/cloudflare/types/zones/settings/security_header_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/security_level_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/server_side_exclude_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/ssl_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/ssl_recommender_param.py delete mode 100644 src/cloudflare/types/zones/settings/tls_1_3_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/tls_client_auth_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/true_client_ip_header_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/waf_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/webp_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/websocket_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/zero_rtt_edit_params.py delete mode 100644 tests/api_resources/zones/settings/test_advanced_ddos.py delete mode 100644 tests/api_resources/zones/settings/test_always_online.py delete mode 100644 tests/api_resources/zones/settings/test_always_use_https.py delete mode 100644 tests/api_resources/zones/settings/test_automatic_https_rewrites.py delete mode 100644 tests/api_resources/zones/settings/test_automatic_platform_optimization.py delete mode 100644 tests/api_resources/zones/settings/test_brotli.py delete mode 100644 tests/api_resources/zones/settings/test_browser_cache_ttl.py delete mode 100644 tests/api_resources/zones/settings/test_browser_check.py delete mode 100644 tests/api_resources/zones/settings/test_cache_level.py delete mode 100644 tests/api_resources/zones/settings/test_challenge_ttl.py delete mode 100644 tests/api_resources/zones/settings/test_ciphers.py delete mode 100644 tests/api_resources/zones/settings/test_development_mode.py delete mode 100644 tests/api_resources/zones/settings/test_early_hints.py delete mode 100644 tests/api_resources/zones/settings/test_email_obfuscation.py delete mode 100644 tests/api_resources/zones/settings/test_h2_prioritization.py delete mode 100644 tests/api_resources/zones/settings/test_hotlink_protection.py delete mode 100644 tests/api_resources/zones/settings/test_http2.py delete mode 100644 tests/api_resources/zones/settings/test_http3.py delete mode 100644 tests/api_resources/zones/settings/test_image_resizing.py delete mode 100644 tests/api_resources/zones/settings/test_ip_geolocation.py delete mode 100644 tests/api_resources/zones/settings/test_ipv6.py delete mode 100644 tests/api_resources/zones/settings/test_min_tls_version.py delete mode 100644 tests/api_resources/zones/settings/test_minify.py delete mode 100644 tests/api_resources/zones/settings/test_mirage.py delete mode 100644 tests/api_resources/zones/settings/test_mobile_redirect.py delete mode 100644 tests/api_resources/zones/settings/test_nel.py delete mode 100644 tests/api_resources/zones/settings/test_opportunistic_encryption.py delete mode 100644 tests/api_resources/zones/settings/test_opportunistic_onion.py delete mode 100644 tests/api_resources/zones/settings/test_orange_to_orange.py delete mode 100644 tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py delete mode 100644 tests/api_resources/zones/settings/test_polish.py delete mode 100644 tests/api_resources/zones/settings/test_prefetch_preload.py delete mode 100644 tests/api_resources/zones/settings/test_proxy_read_timeout.py delete mode 100644 tests/api_resources/zones/settings/test_pseudo_ipv4.py delete mode 100644 tests/api_resources/zones/settings/test_response_buffering.py delete mode 100644 tests/api_resources/zones/settings/test_rocket_loader.py delete mode 100644 tests/api_resources/zones/settings/test_security_headers.py delete mode 100644 tests/api_resources/zones/settings/test_security_level.py delete mode 100644 tests/api_resources/zones/settings/test_server_side_excludes.py delete mode 100644 tests/api_resources/zones/settings/test_sort_query_string_for_cache.py delete mode 100644 tests/api_resources/zones/settings/test_ssl.py delete mode 100644 tests/api_resources/zones/settings/test_ssl_recommender.py delete mode 100644 tests/api_resources/zones/settings/test_tls_1_3.py delete mode 100644 tests/api_resources/zones/settings/test_tls_client_auth.py delete mode 100644 tests/api_resources/zones/settings/test_true_client_ip_header.py delete mode 100644 tests/api_resources/zones/settings/test_waf.py delete mode 100644 tests/api_resources/zones/settings/test_webp.py delete mode 100644 tests/api_resources/zones/settings/test_websocket.py delete mode 100644 tests/api_resources/zones/settings/test_zero_rtt.py diff --git a/.stats.yml b/.stats.yml index 72dd24c9531..ed30724f8aa 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-cd837fea75977564d3cf39f8e1799785f77785a6fcc538d9c2471156a6d309b1.yml +configured_endpoints: 1256 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dbe283789a3023e23b1cae66d3cd8f4bdde2422ce3e8d3f88c42bf8a0791e622.yml diff --git a/api.md b/api.md index 3f970882269..4a571e0960a 100644 --- a/api.md +++ b/api.md @@ -315,11 +315,6 @@ Types: from cloudflare.types.zones.settings import ZeroRTT ``` -Methods: - -- client.zones.settings.zero_rtt.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.zero_rtt.get(\*, zone_id) -> Optional - ### AdvancedDDoS Types: @@ -328,10 +323,6 @@ Types: from cloudflare.types.zones.settings import AdvancedDDoS ``` -Methods: - -- client.zones.settings.advanced_ddos.get(\*, zone_id) -> Optional - ### AlwaysOnline Types: @@ -340,11 +331,6 @@ Types: from cloudflare.types.zones.settings import AlwaysOnline ``` -Methods: - -- client.zones.settings.always_online.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.always_online.get(\*, zone_id) -> Optional - ### AlwaysUseHTTPS Types: @@ -353,11 +339,6 @@ Types: from cloudflare.types.zones.settings import AlwaysUseHTTPS ``` -Methods: - -- client.zones.settings.always_use_https.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.always_use_https.get(\*, zone_id) -> Optional - ### AutomaticHTTPSRewrites Types: @@ -366,11 +347,6 @@ Types: from cloudflare.types.zones.settings import AutomaticHTTPSRewrites ``` -Methods: - -- client.zones.settings.automatic_https_rewrites.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.automatic_https_rewrites.get(\*, zone_id) -> Optional - ### AutomaticPlatformOptimization Types: @@ -379,11 +355,6 @@ Types: from cloudflare.types.zones.settings import AutomaticPlatformOptimization ``` -Methods: - -- client.zones.settings.automatic_platform_optimization.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.automatic_platform_optimization.get(\*, zone_id) -> Optional - ### Brotli Types: @@ -392,11 +363,6 @@ Types: from cloudflare.types.zones.settings import Brotli ``` -Methods: - -- client.zones.settings.brotli.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.brotli.get(\*, zone_id) -> Optional - ### BrowserCacheTTL Types: @@ -405,11 +371,6 @@ Types: from cloudflare.types.zones.settings import BrowserCacheTTL ``` -Methods: - -- client.zones.settings.browser_cache_ttl.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.browser_cache_ttl.get(\*, zone_id) -> Optional - ### BrowserCheck Types: @@ -418,11 +379,6 @@ Types: from cloudflare.types.zones.settings import BrowserCheck ``` -Methods: - -- client.zones.settings.browser_check.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.browser_check.get(\*, zone_id) -> Optional - ### CacheLevel Types: @@ -431,11 +387,6 @@ Types: from cloudflare.types.zones.settings import CacheLevel ``` -Methods: - -- client.zones.settings.cache_level.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.cache_level.get(\*, zone_id) -> Optional - ### ChallengeTTL Types: @@ -444,11 +395,6 @@ Types: from cloudflare.types.zones.settings import ChallengeTTL ``` -Methods: - -- client.zones.settings.challenge_ttl.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.challenge_ttl.get(\*, zone_id) -> Optional - ### Ciphers Types: @@ -457,11 +403,6 @@ Types: from cloudflare.types.zones.settings import Ciphers ``` -Methods: - -- client.zones.settings.ciphers.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ciphers.get(\*, zone_id) -> Optional - ### DevelopmentMode Types: @@ -470,11 +411,6 @@ Types: from cloudflare.types.zones.settings import DevelopmentMode ``` -Methods: - -- client.zones.settings.development_mode.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.development_mode.get(\*, zone_id) -> Optional - ### EarlyHints Types: @@ -483,11 +419,6 @@ Types: from cloudflare.types.zones.settings import EarlyHints ``` -Methods: - -- client.zones.settings.early_hints.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.early_hints.get(\*, zone_id) -> Optional - ### EmailObfuscation Types: @@ -496,11 +427,6 @@ Types: from cloudflare.types.zones.settings import EmailObfuscation ``` -Methods: - -- client.zones.settings.email_obfuscation.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.email_obfuscation.get(\*, zone_id) -> Optional - ### H2Prioritization Types: @@ -509,11 +435,6 @@ Types: from cloudflare.types.zones.settings import H2Prioritization ``` -Methods: - -- client.zones.settings.h2_prioritization.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.h2_prioritization.get(\*, zone_id) -> Optional - ### HotlinkProtection Types: @@ -522,11 +443,6 @@ Types: from cloudflare.types.zones.settings import HotlinkProtection ``` -Methods: - -- client.zones.settings.hotlink_protection.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.hotlink_protection.get(\*, zone_id) -> Optional - ### HTTP2 Types: @@ -535,11 +451,6 @@ Types: from cloudflare.types.zones.settings import HTTP2 ``` -Methods: - -- client.zones.settings.http2.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.http2.get(\*, zone_id) -> Optional - ### HTTP3 Types: @@ -548,11 +459,6 @@ Types: from cloudflare.types.zones.settings import HTTP3 ``` -Methods: - -- client.zones.settings.http3.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.http3.get(\*, zone_id) -> Optional - ### ImageResizing Types: @@ -561,11 +467,6 @@ Types: from cloudflare.types.zones.settings import ImageResizing ``` -Methods: - -- client.zones.settings.image_resizing.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.image_resizing.get(\*, zone_id) -> Optional - ### IPGeolocation Types: @@ -574,11 +475,6 @@ Types: from cloudflare.types.zones.settings import IPGeolocation ``` -Methods: - -- client.zones.settings.ip_geolocation.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ip_geolocation.get(\*, zone_id) -> Optional - ### IPV6 Types: @@ -587,11 +483,6 @@ Types: from cloudflare.types.zones.settings import IPV6 ``` -Methods: - -- client.zones.settings.ipv6.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ipv6.get(\*, zone_id) -> Optional - ### MinTLSVersion Types: @@ -600,11 +491,6 @@ Types: from cloudflare.types.zones.settings import MinTLSVersion ``` -Methods: - -- client.zones.settings.min_tls_version.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.min_tls_version.get(\*, zone_id) -> Optional - ### Minify Types: @@ -613,11 +499,6 @@ Types: from cloudflare.types.zones.settings import Minify ``` -Methods: - -- client.zones.settings.minify.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.minify.get(\*, zone_id) -> Optional - ### Mirage Types: @@ -626,11 +507,6 @@ Types: from cloudflare.types.zones.settings import Mirage ``` -Methods: - -- client.zones.settings.mirage.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.mirage.get(\*, zone_id) -> Optional - ### MobileRedirect Types: @@ -639,11 +515,6 @@ Types: from cloudflare.types.zones.settings import MobileRedirect ``` -Methods: - -- client.zones.settings.mobile_redirect.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.mobile_redirect.get(\*, zone_id) -> Optional - ### NEL Types: @@ -652,11 +523,6 @@ Types: from cloudflare.types.zones.settings import NEL ``` -Methods: - -- client.zones.settings.nel.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.nel.get(\*, zone_id) -> Optional - ### OpportunisticEncryption Types: @@ -665,11 +531,6 @@ Types: from cloudflare.types.zones.settings import OpportunisticEncryption ``` -Methods: - -- client.zones.settings.opportunistic_encryption.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.opportunistic_encryption.get(\*, zone_id) -> Optional - ### OpportunisticOnion Types: @@ -678,11 +539,6 @@ Types: from cloudflare.types.zones.settings import OpportunisticOnion ``` -Methods: - -- client.zones.settings.opportunistic_onion.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.opportunistic_onion.get(\*, zone_id) -> Optional - ### OrangeToOrange Types: @@ -691,11 +547,6 @@ Types: from cloudflare.types.zones.settings import OrangeToOrange ``` -Methods: - -- client.zones.settings.orange_to_orange.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.orange_to_orange.get(\*, zone_id) -> Optional - ### OriginErrorPagePassThru Types: @@ -704,11 +555,6 @@ Types: from cloudflare.types.zones.settings import OriginErrorPagePassThru ``` -Methods: - -- client.zones.settings.origin_error_page_pass_thru.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.origin_error_page_pass_thru.get(\*, zone_id) -> Optional - ### OriginMaxHTTPVersion Types: @@ -734,11 +580,6 @@ Types: from cloudflare.types.zones.settings import Polish ``` -Methods: - -- client.zones.settings.polish.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.polish.get(\*, zone_id) -> Optional - ### PrefetchPreload Types: @@ -747,11 +588,6 @@ Types: from cloudflare.types.zones.settings import PrefetchPreload ``` -Methods: - -- client.zones.settings.prefetch_preload.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.prefetch_preload.get(\*, zone_id) -> Optional - ### ProxyReadTimeout Types: @@ -760,11 +596,6 @@ Types: from cloudflare.types.zones.settings import ProxyReadTimeout ``` -Methods: - -- client.zones.settings.proxy_read_timeout.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.proxy_read_timeout.get(\*, zone_id) -> Optional - ### PseudoIPV4 Types: @@ -773,11 +604,6 @@ Types: from cloudflare.types.zones.settings import PseudoIPV4 ``` -Methods: - -- client.zones.settings.pseudo_ipv4.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.pseudo_ipv4.get(\*, zone_id) -> Optional - ### ResponseBuffering Types: @@ -786,11 +612,6 @@ Types: from cloudflare.types.zones.settings import ResponseBuffering ``` -Methods: - -- client.zones.settings.response_buffering.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.response_buffering.get(\*, zone_id) -> Optional - ### RocketLoader Types: @@ -799,11 +620,6 @@ Types: from cloudflare.types.zones.settings import RocketLoader ``` -Methods: - -- client.zones.settings.rocket_loader.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.rocket_loader.get(\*, zone_id) -> Optional - ### SecurityHeaders Types: @@ -812,11 +628,6 @@ Types: from cloudflare.types.zones.settings import SecurityHeaders ``` -Methods: - -- client.zones.settings.security_headers.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.security_headers.get(\*, zone_id) -> Optional - ### SecurityLevel Types: @@ -825,11 +636,6 @@ Types: from cloudflare.types.zones.settings import SecurityLevel ``` -Methods: - -- client.zones.settings.security_level.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.security_level.get(\*, zone_id) -> Optional - ### ServerSideExcludes Types: @@ -838,11 +644,6 @@ Types: from cloudflare.types.zones.settings import ServerSideExcludes ``` -Methods: - -- client.zones.settings.server_side_excludes.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.server_side_excludes.get(\*, zone_id) -> Optional - ### SortQueryStringForCache Types: @@ -851,11 +652,6 @@ Types: from cloudflare.types.zones.settings import SortQueryStringForCache ``` -Methods: - -- client.zones.settings.sort_query_string_for_cache.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.sort_query_string_for_cache.get(\*, zone_id) -> Optional - ### SSL Types: @@ -864,11 +660,6 @@ Types: from cloudflare.types.zones.settings import SSL ``` -Methods: - -- client.zones.settings.ssl.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ssl.get(\*, zone_id) -> Optional - ### SSLRecommender Types: @@ -877,11 +668,6 @@ Types: from cloudflare.types.zones.settings import SSLRecommender ``` -Methods: - -- client.zones.settings.ssl_recommender.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ssl_recommender.get(\*, zone_id) -> Optional - ### TLS1_3 Types: @@ -890,11 +676,6 @@ Types: from cloudflare.types.zones.settings import TLS1_3 ``` -Methods: - -- client.zones.settings.tls_1_3.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.tls_1_3.get(\*, zone_id) -> Optional - ### TLSClientAuth Types: @@ -903,11 +684,6 @@ Types: from cloudflare.types.zones.settings import TLSClientAuth ``` -Methods: - -- client.zones.settings.tls_client_auth.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.tls_client_auth.get(\*, zone_id) -> Optional - ### TrueClientIPHeader Types: @@ -916,11 +692,6 @@ Types: from cloudflare.types.zones.settings import TrueClientIPHeader ``` -Methods: - -- client.zones.settings.true_client_ip_header.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.true_client_ip_header.get(\*, zone_id) -> Optional - ### WAF Types: @@ -929,11 +700,6 @@ Types: from cloudflare.types.zones.settings import WAF ``` -Methods: - -- client.zones.settings.waf.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.waf.get(\*, zone_id) -> Optional - ### WebP Types: @@ -942,11 +708,6 @@ Types: from cloudflare.types.zones.settings import WebP ``` -Methods: - -- client.zones.settings.webp.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.webp.get(\*, zone_id) -> Optional - ### Websocket Types: @@ -955,11 +716,6 @@ Types: from cloudflare.types.zones.settings import Websocket ``` -Methods: - -- client.zones.settings.websocket.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.websocket.get(\*, zone_id) -> Optional - ### FontSettings Types: diff --git a/src/cloudflare/resources/zones/settings/__init__.py b/src/cloudflare/resources/zones/settings/__init__.py index 1ac5af2ef0a..ae9eeaf9d4a 100644 --- a/src/cloudflare/resources/zones/settings/__init__.py +++ b/src/cloudflare/resources/zones/settings/__init__.py @@ -1,109 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from .nel import ( - NELResource, - AsyncNELResource, - NELResourceWithRawResponse, - AsyncNELResourceWithRawResponse, - NELResourceWithStreamingResponse, - AsyncNELResourceWithStreamingResponse, -) -from .ssl import ( - SSLResource, - AsyncSSLResource, - SSLResourceWithRawResponse, - AsyncSSLResourceWithRawResponse, - SSLResourceWithStreamingResponse, - AsyncSSLResourceWithStreamingResponse, -) -from .waf import ( - WAFResource, - AsyncWAFResource, - WAFResourceWithRawResponse, - AsyncWAFResourceWithRawResponse, - WAFResourceWithStreamingResponse, - AsyncWAFResourceWithStreamingResponse, -) -from .ipv6 import ( - IPV6Resource, - AsyncIPV6Resource, - IPV6ResourceWithRawResponse, - AsyncIPV6ResourceWithRawResponse, - IPV6ResourceWithStreamingResponse, - AsyncIPV6ResourceWithStreamingResponse, -) -from .webp import ( - WebPResource, - AsyncWebPResource, - WebPResourceWithRawResponse, - AsyncWebPResourceWithRawResponse, - WebPResourceWithStreamingResponse, - AsyncWebPResourceWithStreamingResponse, -) -from .http2 import ( - HTTP2Resource, - AsyncHTTP2Resource, - HTTP2ResourceWithRawResponse, - AsyncHTTP2ResourceWithRawResponse, - HTTP2ResourceWithStreamingResponse, - AsyncHTTP2ResourceWithStreamingResponse, -) -from .http3 import ( - HTTP3Resource, - AsyncHTTP3Resource, - HTTP3ResourceWithRawResponse, - AsyncHTTP3ResourceWithRawResponse, - HTTP3ResourceWithStreamingResponse, - AsyncHTTP3ResourceWithStreamingResponse, -) -from .brotli import ( - BrotliResource, - AsyncBrotliResource, - BrotliResourceWithRawResponse, - AsyncBrotliResourceWithRawResponse, - BrotliResourceWithStreamingResponse, - AsyncBrotliResourceWithStreamingResponse, -) -from .minify import ( - MinifyResource, - AsyncMinifyResource, - MinifyResourceWithRawResponse, - AsyncMinifyResourceWithRawResponse, - MinifyResourceWithStreamingResponse, - AsyncMinifyResourceWithStreamingResponse, -) -from .mirage import ( - MirageResource, - AsyncMirageResource, - MirageResourceWithRawResponse, - AsyncMirageResourceWithRawResponse, - MirageResourceWithStreamingResponse, - AsyncMirageResourceWithStreamingResponse, -) -from .polish import ( - PolishResource, - AsyncPolishResource, - PolishResourceWithRawResponse, - AsyncPolishResourceWithRawResponse, - PolishResourceWithStreamingResponse, - AsyncPolishResourceWithStreamingResponse, -) -from .ciphers import ( - CiphersResource, - AsyncCiphersResource, - CiphersResourceWithRawResponse, - AsyncCiphersResourceWithRawResponse, - CiphersResourceWithStreamingResponse, - AsyncCiphersResourceWithStreamingResponse, -) -from .tls_1_3 import ( - TLS1_3Resource, - AsyncTLS1_3Resource, - TLS1_3ResourceWithRawResponse, - AsyncTLS1_3ResourceWithRawResponse, - TLS1_3ResourceWithStreamingResponse, - AsyncTLS1_3ResourceWithStreamingResponse, -) from .settings import ( SettingsResource, AsyncSettingsResource, @@ -112,78 +8,6 @@ SettingsResourceWithStreamingResponse, AsyncSettingsResourceWithStreamingResponse, ) -from .zero_rtt import ( - ZeroRTTResource, - AsyncZeroRTTResource, - ZeroRTTResourceWithRawResponse, - AsyncZeroRTTResourceWithRawResponse, - ZeroRTTResourceWithStreamingResponse, - AsyncZeroRTTResourceWithStreamingResponse, -) -from .websocket import ( - WebsocketResource, - AsyncWebsocketResource, - WebsocketResourceWithRawResponse, - AsyncWebsocketResourceWithRawResponse, - WebsocketResourceWithStreamingResponse, - AsyncWebsocketResourceWithStreamingResponse, -) -from .cache_level import ( - CacheLevelResource, - AsyncCacheLevelResource, - CacheLevelResourceWithRawResponse, - AsyncCacheLevelResourceWithRawResponse, - CacheLevelResourceWithStreamingResponse, - AsyncCacheLevelResourceWithStreamingResponse, -) -from .early_hints import ( - EarlyHintsResource, - AsyncEarlyHintsResource, - EarlyHintsResourceWithRawResponse, - AsyncEarlyHintsResourceWithRawResponse, - EarlyHintsResourceWithStreamingResponse, - AsyncEarlyHintsResourceWithStreamingResponse, -) -from .pseudo_ipv4 import ( - PseudoIPV4Resource, - AsyncPseudoIPV4Resource, - PseudoIPV4ResourceWithRawResponse, - AsyncPseudoIPV4ResourceWithRawResponse, - PseudoIPV4ResourceWithStreamingResponse, - AsyncPseudoIPV4ResourceWithStreamingResponse, -) -from .advanced_ddos import ( - AdvancedDDoSResource, - AsyncAdvancedDDoSResource, - AdvancedDDoSResourceWithRawResponse, - AsyncAdvancedDDoSResourceWithRawResponse, - AdvancedDDoSResourceWithStreamingResponse, - AsyncAdvancedDDoSResourceWithStreamingResponse, -) -from .always_online import ( - AlwaysOnlineResource, - AsyncAlwaysOnlineResource, - AlwaysOnlineResourceWithRawResponse, - AsyncAlwaysOnlineResourceWithRawResponse, - AlwaysOnlineResourceWithStreamingResponse, - AsyncAlwaysOnlineResourceWithStreamingResponse, -) -from .browser_check import ( - BrowserCheckResource, - AsyncBrowserCheckResource, - BrowserCheckResourceWithRawResponse, - AsyncBrowserCheckResourceWithRawResponse, - BrowserCheckResourceWithStreamingResponse, - AsyncBrowserCheckResourceWithStreamingResponse, -) -from .challenge_ttl import ( - ChallengeTTLResource, - AsyncChallengeTTLResource, - ChallengeTTLResourceWithRawResponse, - AsyncChallengeTTLResourceWithRawResponse, - ChallengeTTLResourceWithStreamingResponse, - AsyncChallengeTTLResourceWithStreamingResponse, -) from .font_settings import ( FontSettingsResource, AsyncFontSettingsResource, @@ -192,182 +16,6 @@ FontSettingsResourceWithStreamingResponse, AsyncFontSettingsResourceWithStreamingResponse, ) -from .rocket_loader import ( - RocketLoaderResource, - AsyncRocketLoaderResource, - RocketLoaderResourceWithRawResponse, - AsyncRocketLoaderResourceWithRawResponse, - RocketLoaderResourceWithStreamingResponse, - AsyncRocketLoaderResourceWithStreamingResponse, -) -from .image_resizing import ( - ImageResizingResource, - AsyncImageResizingResource, - ImageResizingResourceWithRawResponse, - AsyncImageResizingResourceWithRawResponse, - ImageResizingResourceWithStreamingResponse, - AsyncImageResizingResourceWithStreamingResponse, -) -from .ip_geolocation import ( - IPGeolocationResource, - AsyncIPGeolocationResource, - IPGeolocationResourceWithRawResponse, - AsyncIPGeolocationResourceWithRawResponse, - IPGeolocationResourceWithStreamingResponse, - AsyncIPGeolocationResourceWithStreamingResponse, -) -from .security_level import ( - SecurityLevelResource, - AsyncSecurityLevelResource, - SecurityLevelResourceWithRawResponse, - AsyncSecurityLevelResourceWithRawResponse, - SecurityLevelResourceWithStreamingResponse, - AsyncSecurityLevelResourceWithStreamingResponse, -) -from .min_tls_version import ( - MinTLSVersionResource, - AsyncMinTLSVersionResource, - MinTLSVersionResourceWithRawResponse, - AsyncMinTLSVersionResourceWithRawResponse, - MinTLSVersionResourceWithStreamingResponse, - AsyncMinTLSVersionResourceWithStreamingResponse, -) -from .mobile_redirect import ( - MobileRedirectResource, - AsyncMobileRedirectResource, - MobileRedirectResourceWithRawResponse, - AsyncMobileRedirectResourceWithRawResponse, - MobileRedirectResourceWithStreamingResponse, - AsyncMobileRedirectResourceWithStreamingResponse, -) -from .ssl_recommender import ( - SSLRecommenderResource, - AsyncSSLRecommenderResource, - SSLRecommenderResourceWithRawResponse, - AsyncSSLRecommenderResourceWithRawResponse, - SSLRecommenderResourceWithStreamingResponse, - AsyncSSLRecommenderResourceWithStreamingResponse, -) -from .tls_client_auth import ( - TLSClientAuthResource, - AsyncTLSClientAuthResource, - TLSClientAuthResourceWithRawResponse, - AsyncTLSClientAuthResourceWithRawResponse, - TLSClientAuthResourceWithStreamingResponse, - AsyncTLSClientAuthResourceWithStreamingResponse, -) -from .always_use_https import ( - AlwaysUseHTTPSResource, - AsyncAlwaysUseHTTPSResource, - AlwaysUseHTTPSResourceWithRawResponse, - AsyncAlwaysUseHTTPSResourceWithRawResponse, - AlwaysUseHTTPSResourceWithStreamingResponse, - AsyncAlwaysUseHTTPSResourceWithStreamingResponse, -) -from .development_mode import ( - DevelopmentModeResource, - AsyncDevelopmentModeResource, - DevelopmentModeResourceWithRawResponse, - AsyncDevelopmentModeResourceWithRawResponse, - DevelopmentModeResourceWithStreamingResponse, - AsyncDevelopmentModeResourceWithStreamingResponse, -) -from .orange_to_orange import ( - OrangeToOrangeResource, - AsyncOrangeToOrangeResource, - OrangeToOrangeResourceWithRawResponse, - AsyncOrangeToOrangeResourceWithRawResponse, - OrangeToOrangeResourceWithStreamingResponse, - AsyncOrangeToOrangeResourceWithStreamingResponse, -) -from .prefetch_preload import ( - PrefetchPreloadResource, - AsyncPrefetchPreloadResource, - PrefetchPreloadResourceWithRawResponse, - AsyncPrefetchPreloadResourceWithRawResponse, - PrefetchPreloadResourceWithStreamingResponse, - AsyncPrefetchPreloadResourceWithStreamingResponse, -) -from .security_headers import ( - SecurityHeadersResource, - AsyncSecurityHeadersResource, - SecurityHeadersResourceWithRawResponse, - AsyncSecurityHeadersResourceWithRawResponse, - SecurityHeadersResourceWithStreamingResponse, - AsyncSecurityHeadersResourceWithStreamingResponse, -) -from .browser_cache_ttl import ( - BrowserCacheTTLResource, - AsyncBrowserCacheTTLResource, - BrowserCacheTTLResourceWithRawResponse, - AsyncBrowserCacheTTLResourceWithRawResponse, - BrowserCacheTTLResourceWithStreamingResponse, - AsyncBrowserCacheTTLResourceWithStreamingResponse, -) -from .email_obfuscation import ( - EmailObfuscationResource, - AsyncEmailObfuscationResource, - EmailObfuscationResourceWithRawResponse, - AsyncEmailObfuscationResourceWithRawResponse, - EmailObfuscationResourceWithStreamingResponse, - AsyncEmailObfuscationResourceWithStreamingResponse, -) -from .h2_prioritization import ( - H2PrioritizationResource, - AsyncH2PrioritizationResource, - H2PrioritizationResourceWithRawResponse, - AsyncH2PrioritizationResourceWithRawResponse, - H2PrioritizationResourceWithStreamingResponse, - AsyncH2PrioritizationResourceWithStreamingResponse, -) -from .hotlink_protection import ( - HotlinkProtectionResource, - AsyncHotlinkProtectionResource, - HotlinkProtectionResourceWithRawResponse, - AsyncHotlinkProtectionResourceWithRawResponse, - HotlinkProtectionResourceWithStreamingResponse, - AsyncHotlinkProtectionResourceWithStreamingResponse, -) -from .proxy_read_timeout import ( - ProxyReadTimeoutResource, - AsyncProxyReadTimeoutResource, - ProxyReadTimeoutResourceWithRawResponse, - AsyncProxyReadTimeoutResourceWithRawResponse, - ProxyReadTimeoutResourceWithStreamingResponse, - AsyncProxyReadTimeoutResourceWithStreamingResponse, -) -from .response_buffering import ( - ResponseBufferingResource, - AsyncResponseBufferingResource, - ResponseBufferingResourceWithRawResponse, - AsyncResponseBufferingResourceWithRawResponse, - ResponseBufferingResourceWithStreamingResponse, - AsyncResponseBufferingResourceWithStreamingResponse, -) -from .opportunistic_onion import ( - OpportunisticOnionResource, - AsyncOpportunisticOnionResource, - OpportunisticOnionResourceWithRawResponse, - AsyncOpportunisticOnionResourceWithRawResponse, - OpportunisticOnionResourceWithStreamingResponse, - AsyncOpportunisticOnionResourceWithStreamingResponse, -) -from .server_side_excludes import ( - ServerSideExcludesResource, - AsyncServerSideExcludesResource, - ServerSideExcludesResourceWithRawResponse, - AsyncServerSideExcludesResourceWithRawResponse, - ServerSideExcludesResourceWithStreamingResponse, - AsyncServerSideExcludesResourceWithStreamingResponse, -) -from .true_client_ip_header import ( - TrueClientIPHeaderResource, - AsyncTrueClientIPHeaderResource, - TrueClientIPHeaderResourceWithRawResponse, - AsyncTrueClientIPHeaderResourceWithRawResponse, - TrueClientIPHeaderResourceWithStreamingResponse, - AsyncTrueClientIPHeaderResourceWithStreamingResponse, -) from .origin_max_http_version import ( OriginMaxHTTPVersionResource, AsyncOriginMaxHTTPVersionResource, @@ -376,348 +24,14 @@ OriginMaxHTTPVersionResourceWithStreamingResponse, AsyncOriginMaxHTTPVersionResourceWithStreamingResponse, ) -from .automatic_https_rewrites import ( - AutomaticHTTPSRewritesResource, - AsyncAutomaticHTTPSRewritesResource, - AutomaticHTTPSRewritesResourceWithRawResponse, - AsyncAutomaticHTTPSRewritesResourceWithRawResponse, - AutomaticHTTPSRewritesResourceWithStreamingResponse, - AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse, -) -from .opportunistic_encryption import ( - OpportunisticEncryptionResource, - AsyncOpportunisticEncryptionResource, - OpportunisticEncryptionResourceWithRawResponse, - AsyncOpportunisticEncryptionResourceWithRawResponse, - OpportunisticEncryptionResourceWithStreamingResponse, - AsyncOpportunisticEncryptionResourceWithStreamingResponse, -) -from .origin_error_page_pass_thru import ( - OriginErrorPagePassThruResource, - AsyncOriginErrorPagePassThruResource, - OriginErrorPagePassThruResourceWithRawResponse, - AsyncOriginErrorPagePassThruResourceWithRawResponse, - OriginErrorPagePassThruResourceWithStreamingResponse, - AsyncOriginErrorPagePassThruResourceWithStreamingResponse, -) -from .sort_query_string_for_cache import ( - SortQueryStringForCacheResource, - AsyncSortQueryStringForCacheResource, - SortQueryStringForCacheResourceWithRawResponse, - AsyncSortQueryStringForCacheResourceWithRawResponse, - SortQueryStringForCacheResourceWithStreamingResponse, - AsyncSortQueryStringForCacheResourceWithStreamingResponse, -) -from .automatic_platform_optimization import ( - AutomaticPlatformOptimizationResource, - AsyncAutomaticPlatformOptimizationResource, - AutomaticPlatformOptimizationResourceWithRawResponse, - AsyncAutomaticPlatformOptimizationResourceWithRawResponse, - AutomaticPlatformOptimizationResourceWithStreamingResponse, - AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse, -) __all__ = [ - "ZeroRTTResource", - "AsyncZeroRTTResource", - "ZeroRTTResourceWithRawResponse", - "AsyncZeroRTTResourceWithRawResponse", - "ZeroRTTResourceWithStreamingResponse", - "AsyncZeroRTTResourceWithStreamingResponse", - "AdvancedDDoSResource", - "AsyncAdvancedDDoSResource", - "AdvancedDDoSResourceWithRawResponse", - "AsyncAdvancedDDoSResourceWithRawResponse", - "AdvancedDDoSResourceWithStreamingResponse", - "AsyncAdvancedDDoSResourceWithStreamingResponse", - "AlwaysOnlineResource", - "AsyncAlwaysOnlineResource", - "AlwaysOnlineResourceWithRawResponse", - "AsyncAlwaysOnlineResourceWithRawResponse", - "AlwaysOnlineResourceWithStreamingResponse", - "AsyncAlwaysOnlineResourceWithStreamingResponse", - "AlwaysUseHTTPSResource", - "AsyncAlwaysUseHTTPSResource", - "AlwaysUseHTTPSResourceWithRawResponse", - "AsyncAlwaysUseHTTPSResourceWithRawResponse", - "AlwaysUseHTTPSResourceWithStreamingResponse", - "AsyncAlwaysUseHTTPSResourceWithStreamingResponse", - "AutomaticHTTPSRewritesResource", - "AsyncAutomaticHTTPSRewritesResource", - "AutomaticHTTPSRewritesResourceWithRawResponse", - "AsyncAutomaticHTTPSRewritesResourceWithRawResponse", - "AutomaticHTTPSRewritesResourceWithStreamingResponse", - "AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse", - "AutomaticPlatformOptimizationResource", - "AsyncAutomaticPlatformOptimizationResource", - "AutomaticPlatformOptimizationResourceWithRawResponse", - "AsyncAutomaticPlatformOptimizationResourceWithRawResponse", - "AutomaticPlatformOptimizationResourceWithStreamingResponse", - "AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse", - "BrotliResource", - "AsyncBrotliResource", - "BrotliResourceWithRawResponse", - "AsyncBrotliResourceWithRawResponse", - "BrotliResourceWithStreamingResponse", - "AsyncBrotliResourceWithStreamingResponse", - "BrowserCacheTTLResource", - "AsyncBrowserCacheTTLResource", - "BrowserCacheTTLResourceWithRawResponse", - "AsyncBrowserCacheTTLResourceWithRawResponse", - "BrowserCacheTTLResourceWithStreamingResponse", - "AsyncBrowserCacheTTLResourceWithStreamingResponse", - "BrowserCheckResource", - "AsyncBrowserCheckResource", - "BrowserCheckResourceWithRawResponse", - "AsyncBrowserCheckResourceWithRawResponse", - "BrowserCheckResourceWithStreamingResponse", - "AsyncBrowserCheckResourceWithStreamingResponse", - "CacheLevelResource", - "AsyncCacheLevelResource", - "CacheLevelResourceWithRawResponse", - "AsyncCacheLevelResourceWithRawResponse", - "CacheLevelResourceWithStreamingResponse", - "AsyncCacheLevelResourceWithStreamingResponse", - "ChallengeTTLResource", - "AsyncChallengeTTLResource", - "ChallengeTTLResourceWithRawResponse", - "AsyncChallengeTTLResourceWithRawResponse", - "ChallengeTTLResourceWithStreamingResponse", - "AsyncChallengeTTLResourceWithStreamingResponse", - "CiphersResource", - "AsyncCiphersResource", - "CiphersResourceWithRawResponse", - "AsyncCiphersResourceWithRawResponse", - "CiphersResourceWithStreamingResponse", - "AsyncCiphersResourceWithStreamingResponse", - "DevelopmentModeResource", - "AsyncDevelopmentModeResource", - "DevelopmentModeResourceWithRawResponse", - "AsyncDevelopmentModeResourceWithRawResponse", - "DevelopmentModeResourceWithStreamingResponse", - "AsyncDevelopmentModeResourceWithStreamingResponse", - "EarlyHintsResource", - "AsyncEarlyHintsResource", - "EarlyHintsResourceWithRawResponse", - "AsyncEarlyHintsResourceWithRawResponse", - "EarlyHintsResourceWithStreamingResponse", - "AsyncEarlyHintsResourceWithStreamingResponse", - "EmailObfuscationResource", - "AsyncEmailObfuscationResource", - "EmailObfuscationResourceWithRawResponse", - "AsyncEmailObfuscationResourceWithRawResponse", - "EmailObfuscationResourceWithStreamingResponse", - "AsyncEmailObfuscationResourceWithStreamingResponse", - "H2PrioritizationResource", - "AsyncH2PrioritizationResource", - "H2PrioritizationResourceWithRawResponse", - "AsyncH2PrioritizationResourceWithRawResponse", - "H2PrioritizationResourceWithStreamingResponse", - "AsyncH2PrioritizationResourceWithStreamingResponse", - "HotlinkProtectionResource", - "AsyncHotlinkProtectionResource", - "HotlinkProtectionResourceWithRawResponse", - "AsyncHotlinkProtectionResourceWithRawResponse", - "HotlinkProtectionResourceWithStreamingResponse", - "AsyncHotlinkProtectionResourceWithStreamingResponse", - "HTTP2Resource", - "AsyncHTTP2Resource", - "HTTP2ResourceWithRawResponse", - "AsyncHTTP2ResourceWithRawResponse", - "HTTP2ResourceWithStreamingResponse", - "AsyncHTTP2ResourceWithStreamingResponse", - "HTTP3Resource", - "AsyncHTTP3Resource", - "HTTP3ResourceWithRawResponse", - "AsyncHTTP3ResourceWithRawResponse", - "HTTP3ResourceWithStreamingResponse", - "AsyncHTTP3ResourceWithStreamingResponse", - "ImageResizingResource", - "AsyncImageResizingResource", - "ImageResizingResourceWithRawResponse", - "AsyncImageResizingResourceWithRawResponse", - "ImageResizingResourceWithStreamingResponse", - "AsyncImageResizingResourceWithStreamingResponse", - "IPGeolocationResource", - "AsyncIPGeolocationResource", - "IPGeolocationResourceWithRawResponse", - "AsyncIPGeolocationResourceWithRawResponse", - "IPGeolocationResourceWithStreamingResponse", - "AsyncIPGeolocationResourceWithStreamingResponse", - "IPV6Resource", - "AsyncIPV6Resource", - "IPV6ResourceWithRawResponse", - "AsyncIPV6ResourceWithRawResponse", - "IPV6ResourceWithStreamingResponse", - "AsyncIPV6ResourceWithStreamingResponse", - "MinTLSVersionResource", - "AsyncMinTLSVersionResource", - "MinTLSVersionResourceWithRawResponse", - "AsyncMinTLSVersionResourceWithRawResponse", - "MinTLSVersionResourceWithStreamingResponse", - "AsyncMinTLSVersionResourceWithStreamingResponse", - "MinifyResource", - "AsyncMinifyResource", - "MinifyResourceWithRawResponse", - "AsyncMinifyResourceWithRawResponse", - "MinifyResourceWithStreamingResponse", - "AsyncMinifyResourceWithStreamingResponse", - "MirageResource", - "AsyncMirageResource", - "MirageResourceWithRawResponse", - "AsyncMirageResourceWithRawResponse", - "MirageResourceWithStreamingResponse", - "AsyncMirageResourceWithStreamingResponse", - "MobileRedirectResource", - "AsyncMobileRedirectResource", - "MobileRedirectResourceWithRawResponse", - "AsyncMobileRedirectResourceWithRawResponse", - "MobileRedirectResourceWithStreamingResponse", - "AsyncMobileRedirectResourceWithStreamingResponse", - "NELResource", - "AsyncNELResource", - "NELResourceWithRawResponse", - "AsyncNELResourceWithRawResponse", - "NELResourceWithStreamingResponse", - "AsyncNELResourceWithStreamingResponse", - "OpportunisticEncryptionResource", - "AsyncOpportunisticEncryptionResource", - "OpportunisticEncryptionResourceWithRawResponse", - "AsyncOpportunisticEncryptionResourceWithRawResponse", - "OpportunisticEncryptionResourceWithStreamingResponse", - "AsyncOpportunisticEncryptionResourceWithStreamingResponse", - "OpportunisticOnionResource", - "AsyncOpportunisticOnionResource", - "OpportunisticOnionResourceWithRawResponse", - "AsyncOpportunisticOnionResourceWithRawResponse", - "OpportunisticOnionResourceWithStreamingResponse", - "AsyncOpportunisticOnionResourceWithStreamingResponse", - "OrangeToOrangeResource", - "AsyncOrangeToOrangeResource", - "OrangeToOrangeResourceWithRawResponse", - "AsyncOrangeToOrangeResourceWithRawResponse", - "OrangeToOrangeResourceWithStreamingResponse", - "AsyncOrangeToOrangeResourceWithStreamingResponse", - "OriginErrorPagePassThruResource", - "AsyncOriginErrorPagePassThruResource", - "OriginErrorPagePassThruResourceWithRawResponse", - "AsyncOriginErrorPagePassThruResourceWithRawResponse", - "OriginErrorPagePassThruResourceWithStreamingResponse", - "AsyncOriginErrorPagePassThruResourceWithStreamingResponse", "OriginMaxHTTPVersionResource", "AsyncOriginMaxHTTPVersionResource", "OriginMaxHTTPVersionResourceWithRawResponse", "AsyncOriginMaxHTTPVersionResourceWithRawResponse", "OriginMaxHTTPVersionResourceWithStreamingResponse", "AsyncOriginMaxHTTPVersionResourceWithStreamingResponse", - "PolishResource", - "AsyncPolishResource", - "PolishResourceWithRawResponse", - "AsyncPolishResourceWithRawResponse", - "PolishResourceWithStreamingResponse", - "AsyncPolishResourceWithStreamingResponse", - "PrefetchPreloadResource", - "AsyncPrefetchPreloadResource", - "PrefetchPreloadResourceWithRawResponse", - "AsyncPrefetchPreloadResourceWithRawResponse", - "PrefetchPreloadResourceWithStreamingResponse", - "AsyncPrefetchPreloadResourceWithStreamingResponse", - "ProxyReadTimeoutResource", - "AsyncProxyReadTimeoutResource", - "ProxyReadTimeoutResourceWithRawResponse", - "AsyncProxyReadTimeoutResourceWithRawResponse", - "ProxyReadTimeoutResourceWithStreamingResponse", - "AsyncProxyReadTimeoutResourceWithStreamingResponse", - "PseudoIPV4Resource", - "AsyncPseudoIPV4Resource", - "PseudoIPV4ResourceWithRawResponse", - "AsyncPseudoIPV4ResourceWithRawResponse", - "PseudoIPV4ResourceWithStreamingResponse", - "AsyncPseudoIPV4ResourceWithStreamingResponse", - "ResponseBufferingResource", - "AsyncResponseBufferingResource", - "ResponseBufferingResourceWithRawResponse", - "AsyncResponseBufferingResourceWithRawResponse", - "ResponseBufferingResourceWithStreamingResponse", - "AsyncResponseBufferingResourceWithStreamingResponse", - "RocketLoaderResource", - "AsyncRocketLoaderResource", - "RocketLoaderResourceWithRawResponse", - "AsyncRocketLoaderResourceWithRawResponse", - "RocketLoaderResourceWithStreamingResponse", - "AsyncRocketLoaderResourceWithStreamingResponse", - "SecurityHeadersResource", - "AsyncSecurityHeadersResource", - "SecurityHeadersResourceWithRawResponse", - "AsyncSecurityHeadersResourceWithRawResponse", - "SecurityHeadersResourceWithStreamingResponse", - "AsyncSecurityHeadersResourceWithStreamingResponse", - "SecurityLevelResource", - "AsyncSecurityLevelResource", - "SecurityLevelResourceWithRawResponse", - "AsyncSecurityLevelResourceWithRawResponse", - "SecurityLevelResourceWithStreamingResponse", - "AsyncSecurityLevelResourceWithStreamingResponse", - "ServerSideExcludesResource", - "AsyncServerSideExcludesResource", - "ServerSideExcludesResourceWithRawResponse", - "AsyncServerSideExcludesResourceWithRawResponse", - "ServerSideExcludesResourceWithStreamingResponse", - "AsyncServerSideExcludesResourceWithStreamingResponse", - "SortQueryStringForCacheResource", - "AsyncSortQueryStringForCacheResource", - "SortQueryStringForCacheResourceWithRawResponse", - "AsyncSortQueryStringForCacheResourceWithRawResponse", - "SortQueryStringForCacheResourceWithStreamingResponse", - "AsyncSortQueryStringForCacheResourceWithStreamingResponse", - "SSLResource", - "AsyncSSLResource", - "SSLResourceWithRawResponse", - "AsyncSSLResourceWithRawResponse", - "SSLResourceWithStreamingResponse", - "AsyncSSLResourceWithStreamingResponse", - "SSLRecommenderResource", - "AsyncSSLRecommenderResource", - "SSLRecommenderResourceWithRawResponse", - "AsyncSSLRecommenderResourceWithRawResponse", - "SSLRecommenderResourceWithStreamingResponse", - "AsyncSSLRecommenderResourceWithStreamingResponse", - "TLS1_3Resource", - "AsyncTLS1_3Resource", - "TLS1_3ResourceWithRawResponse", - "AsyncTLS1_3ResourceWithRawResponse", - "TLS1_3ResourceWithStreamingResponse", - "AsyncTLS1_3ResourceWithStreamingResponse", - "TLSClientAuthResource", - "AsyncTLSClientAuthResource", - "TLSClientAuthResourceWithRawResponse", - "AsyncTLSClientAuthResourceWithRawResponse", - "TLSClientAuthResourceWithStreamingResponse", - "AsyncTLSClientAuthResourceWithStreamingResponse", - "TrueClientIPHeaderResource", - "AsyncTrueClientIPHeaderResource", - "TrueClientIPHeaderResourceWithRawResponse", - "AsyncTrueClientIPHeaderResourceWithRawResponse", - "TrueClientIPHeaderResourceWithStreamingResponse", - "AsyncTrueClientIPHeaderResourceWithStreamingResponse", - "WAFResource", - "AsyncWAFResource", - "WAFResourceWithRawResponse", - "AsyncWAFResourceWithRawResponse", - "WAFResourceWithStreamingResponse", - "AsyncWAFResourceWithStreamingResponse", - "WebPResource", - "AsyncWebPResource", - "WebPResourceWithRawResponse", - "AsyncWebPResourceWithRawResponse", - "WebPResourceWithStreamingResponse", - "AsyncWebPResourceWithStreamingResponse", - "WebsocketResource", - "AsyncWebsocketResource", - "WebsocketResourceWithRawResponse", - "AsyncWebsocketResourceWithRawResponse", - "WebsocketResourceWithStreamingResponse", - "AsyncWebsocketResourceWithStreamingResponse", "FontSettingsResource", "AsyncFontSettingsResource", "FontSettingsResourceWithRawResponse", diff --git a/src/cloudflare/resources/zones/settings/advanced_ddos.py b/src/cloudflare/resources/zones/settings/advanced_ddos.py deleted file mode 100644 index 0b862955cf6..00000000000 --- a/src/cloudflare/resources/zones/settings/advanced_ddos.py +++ /dev/null @@ -1,162 +0,0 @@ -# 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 ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings.advanced_ddos import AdvancedDDoS - -__all__ = ["AdvancedDDoSResource", "AsyncAdvancedDDoSResource"] - - -class AdvancedDDoSResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AdvancedDDoSResourceWithRawResponse: - return AdvancedDDoSResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AdvancedDDoSResourceWithStreamingResponse: - return AdvancedDDoSResourceWithStreamingResponse(self) - - def get( - self, - *, - zone_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[AdvancedDDoS]: - """ - Advanced protection from Distributed Denial of Service (DDoS) attacks on your - website. This is an uneditable value that is 'on' in the case of Business and - Enterprise zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/advanced_ddos", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AdvancedDDoS]]._unwrapper, - ), - cast_to=cast(Type[Optional[AdvancedDDoS]], ResultWrapper[AdvancedDDoS]), - ) - - -class AsyncAdvancedDDoSResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAdvancedDDoSResourceWithRawResponse: - return AsyncAdvancedDDoSResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAdvancedDDoSResourceWithStreamingResponse: - return AsyncAdvancedDDoSResourceWithStreamingResponse(self) - - async def get( - self, - *, - zone_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[AdvancedDDoS]: - """ - Advanced protection from Distributed Denial of Service (DDoS) attacks on your - website. This is an uneditable value that is 'on' in the case of Business and - Enterprise zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/advanced_ddos", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AdvancedDDoS]]._unwrapper, - ), - cast_to=cast(Type[Optional[AdvancedDDoS]], ResultWrapper[AdvancedDDoS]), - ) - - -class AdvancedDDoSResourceWithRawResponse: - def __init__(self, advanced_ddos: AdvancedDDoSResource) -> None: - self._advanced_ddos = advanced_ddos - - self.get = to_raw_response_wrapper( - advanced_ddos.get, - ) - - -class AsyncAdvancedDDoSResourceWithRawResponse: - def __init__(self, advanced_ddos: AsyncAdvancedDDoSResource) -> None: - self._advanced_ddos = advanced_ddos - - self.get = async_to_raw_response_wrapper( - advanced_ddos.get, - ) - - -class AdvancedDDoSResourceWithStreamingResponse: - def __init__(self, advanced_ddos: AdvancedDDoSResource) -> None: - self._advanced_ddos = advanced_ddos - - self.get = to_streamed_response_wrapper( - advanced_ddos.get, - ) - - -class AsyncAdvancedDDoSResourceWithStreamingResponse: - def __init__(self, advanced_ddos: AsyncAdvancedDDoSResource) -> None: - self._advanced_ddos = advanced_ddos - - self.get = async_to_streamed_response_wrapper( - advanced_ddos.get, - ) diff --git a/src/cloudflare/resources/zones/settings/always_online.py b/src/cloudflare/resources/zones/settings/always_online.py deleted file mode 100644 index df0c7324373..00000000000 --- a/src/cloudflare/resources/zones/settings/always_online.py +++ /dev/null @@ -1,278 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import always_online_edit_params -from ....types.zones.settings.always_online import AlwaysOnline - -__all__ = ["AlwaysOnlineResource", "AsyncAlwaysOnlineResource"] - - -class AlwaysOnlineResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AlwaysOnlineResourceWithRawResponse: - return AlwaysOnlineResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AlwaysOnlineResourceWithStreamingResponse: - return AlwaysOnlineResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AlwaysOnline]: - """ - When enabled, Cloudflare serves limited copies of web pages available from the - [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is - offline. Refer to - [Always Online](https://developers.cloudflare.com/cache/about/always-online) for - more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/always_online", - body=maybe_transform({"value": value}, always_online_edit_params.AlwaysOnlineEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysOnline]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]), - ) - - def get( - self, - *, - zone_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[AlwaysOnline]: - """ - When enabled, Cloudflare serves limited copies of web pages available from the - [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is - offline. Refer to - [Always Online](https://developers.cloudflare.com/cache/about/always-online) for - more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/always_online", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysOnline]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]), - ) - - -class AsyncAlwaysOnlineResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAlwaysOnlineResourceWithRawResponse: - return AsyncAlwaysOnlineResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAlwaysOnlineResourceWithStreamingResponse: - return AsyncAlwaysOnlineResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AlwaysOnline]: - """ - When enabled, Cloudflare serves limited copies of web pages available from the - [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is - offline. Refer to - [Always Online](https://developers.cloudflare.com/cache/about/always-online) for - more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/always_online", - body=await async_maybe_transform({"value": value}, always_online_edit_params.AlwaysOnlineEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysOnline]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]), - ) - - async def get( - self, - *, - zone_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[AlwaysOnline]: - """ - When enabled, Cloudflare serves limited copies of web pages available from the - [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is - offline. Refer to - [Always Online](https://developers.cloudflare.com/cache/about/always-online) for - more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/always_online", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysOnline]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]), - ) - - -class AlwaysOnlineResourceWithRawResponse: - def __init__(self, always_online: AlwaysOnlineResource) -> None: - self._always_online = always_online - - self.edit = to_raw_response_wrapper( - always_online.edit, - ) - self.get = to_raw_response_wrapper( - always_online.get, - ) - - -class AsyncAlwaysOnlineResourceWithRawResponse: - def __init__(self, always_online: AsyncAlwaysOnlineResource) -> None: - self._always_online = always_online - - self.edit = async_to_raw_response_wrapper( - always_online.edit, - ) - self.get = async_to_raw_response_wrapper( - always_online.get, - ) - - -class AlwaysOnlineResourceWithStreamingResponse: - def __init__(self, always_online: AlwaysOnlineResource) -> None: - self._always_online = always_online - - self.edit = to_streamed_response_wrapper( - always_online.edit, - ) - self.get = to_streamed_response_wrapper( - always_online.get, - ) - - -class AsyncAlwaysOnlineResourceWithStreamingResponse: - def __init__(self, always_online: AsyncAlwaysOnlineResource) -> None: - self._always_online = always_online - - self.edit = async_to_streamed_response_wrapper( - always_online.edit, - ) - self.get = async_to_streamed_response_wrapper( - always_online.get, - ) diff --git a/src/cloudflare/resources/zones/settings/always_use_https.py b/src/cloudflare/resources/zones/settings/always_use_https.py deleted file mode 100644 index 3e9a208f93d..00000000000 --- a/src/cloudflare/resources/zones/settings/always_use_https.py +++ /dev/null @@ -1,270 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import always_use_https_edit_params -from ....types.zones.settings.always_use_https import AlwaysUseHTTPS - -__all__ = ["AlwaysUseHTTPSResource", "AsyncAlwaysUseHTTPSResource"] - - -class AlwaysUseHTTPSResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AlwaysUseHTTPSResourceWithRawResponse: - return AlwaysUseHTTPSResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AlwaysUseHTTPSResourceWithStreamingResponse: - return AlwaysUseHTTPSResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AlwaysUseHTTPS]: - """ - Reply to all requests for URLs that use "http" with a 301 redirect to the - equivalent "https" URL. If you only want to redirect for a subset of requests, - consider creating an "Always use HTTPS" page rule. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/always_use_https", - body=maybe_transform({"value": value}, always_use_https_edit_params.AlwaysUseHTTPSEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysUseHTTPS]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysUseHTTPS]], ResultWrapper[AlwaysUseHTTPS]), - ) - - def get( - self, - *, - zone_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[AlwaysUseHTTPS]: - """ - Reply to all requests for URLs that use "http" with a 301 redirect to the - equivalent "https" URL. If you only want to redirect for a subset of requests, - consider creating an "Always use HTTPS" page rule. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/always_use_https", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysUseHTTPS]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysUseHTTPS]], ResultWrapper[AlwaysUseHTTPS]), - ) - - -class AsyncAlwaysUseHTTPSResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAlwaysUseHTTPSResourceWithRawResponse: - return AsyncAlwaysUseHTTPSResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAlwaysUseHTTPSResourceWithStreamingResponse: - return AsyncAlwaysUseHTTPSResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AlwaysUseHTTPS]: - """ - Reply to all requests for URLs that use "http" with a 301 redirect to the - equivalent "https" URL. If you only want to redirect for a subset of requests, - consider creating an "Always use HTTPS" page rule. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/always_use_https", - body=await async_maybe_transform({"value": value}, always_use_https_edit_params.AlwaysUseHTTPSEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysUseHTTPS]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysUseHTTPS]], ResultWrapper[AlwaysUseHTTPS]), - ) - - async def get( - self, - *, - zone_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[AlwaysUseHTTPS]: - """ - Reply to all requests for URLs that use "http" with a 301 redirect to the - equivalent "https" URL. If you only want to redirect for a subset of requests, - consider creating an "Always use HTTPS" page rule. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/always_use_https", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AlwaysUseHTTPS]]._unwrapper, - ), - cast_to=cast(Type[Optional[AlwaysUseHTTPS]], ResultWrapper[AlwaysUseHTTPS]), - ) - - -class AlwaysUseHTTPSResourceWithRawResponse: - def __init__(self, always_use_https: AlwaysUseHTTPSResource) -> None: - self._always_use_https = always_use_https - - self.edit = to_raw_response_wrapper( - always_use_https.edit, - ) - self.get = to_raw_response_wrapper( - always_use_https.get, - ) - - -class AsyncAlwaysUseHTTPSResourceWithRawResponse: - def __init__(self, always_use_https: AsyncAlwaysUseHTTPSResource) -> None: - self._always_use_https = always_use_https - - self.edit = async_to_raw_response_wrapper( - always_use_https.edit, - ) - self.get = async_to_raw_response_wrapper( - always_use_https.get, - ) - - -class AlwaysUseHTTPSResourceWithStreamingResponse: - def __init__(self, always_use_https: AlwaysUseHTTPSResource) -> None: - self._always_use_https = always_use_https - - self.edit = to_streamed_response_wrapper( - always_use_https.edit, - ) - self.get = to_streamed_response_wrapper( - always_use_https.get, - ) - - -class AsyncAlwaysUseHTTPSResourceWithStreamingResponse: - def __init__(self, always_use_https: AsyncAlwaysUseHTTPSResource) -> None: - self._always_use_https = always_use_https - - self.edit = async_to_streamed_response_wrapper( - always_use_https.edit, - ) - self.get = async_to_streamed_response_wrapper( - always_use_https.get, - ) diff --git a/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py b/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py deleted file mode 100644 index 329edb96881..00000000000 --- a/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py +++ /dev/null @@ -1,266 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import automatic_https_rewrite_edit_params -from ....types.zones.settings.automatic_https_rewrites import AutomaticHTTPSRewrites - -__all__ = ["AutomaticHTTPSRewritesResource", "AsyncAutomaticHTTPSRewritesResource"] - - -class AutomaticHTTPSRewritesResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AutomaticHTTPSRewritesResourceWithRawResponse: - return AutomaticHTTPSRewritesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AutomaticHTTPSRewritesResourceWithStreamingResponse: - return AutomaticHTTPSRewritesResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AutomaticHTTPSRewrites]: - """ - Enable the Automatic HTTPS Rewrites feature for this zone. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/automatic_https_rewrites", - body=maybe_transform({"value": value}, automatic_https_rewrite_edit_params.AutomaticHTTPSRewriteEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticHTTPSRewrites]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticHTTPSRewrites]], ResultWrapper[AutomaticHTTPSRewrites]), - ) - - def get( - self, - *, - zone_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[AutomaticHTTPSRewrites]: - """ - Enable the Automatic HTTPS Rewrites feature for this zone. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/automatic_https_rewrites", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticHTTPSRewrites]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticHTTPSRewrites]], ResultWrapper[AutomaticHTTPSRewrites]), - ) - - -class AsyncAutomaticHTTPSRewritesResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAutomaticHTTPSRewritesResourceWithRawResponse: - return AsyncAutomaticHTTPSRewritesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse: - return AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AutomaticHTTPSRewrites]: - """ - Enable the Automatic HTTPS Rewrites feature for this zone. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/automatic_https_rewrites", - body=await async_maybe_transform( - {"value": value}, automatic_https_rewrite_edit_params.AutomaticHTTPSRewriteEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticHTTPSRewrites]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticHTTPSRewrites]], ResultWrapper[AutomaticHTTPSRewrites]), - ) - - async def get( - self, - *, - zone_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[AutomaticHTTPSRewrites]: - """ - Enable the Automatic HTTPS Rewrites feature for this zone. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/automatic_https_rewrites", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticHTTPSRewrites]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticHTTPSRewrites]], ResultWrapper[AutomaticHTTPSRewrites]), - ) - - -class AutomaticHTTPSRewritesResourceWithRawResponse: - def __init__(self, automatic_https_rewrites: AutomaticHTTPSRewritesResource) -> None: - self._automatic_https_rewrites = automatic_https_rewrites - - self.edit = to_raw_response_wrapper( - automatic_https_rewrites.edit, - ) - self.get = to_raw_response_wrapper( - automatic_https_rewrites.get, - ) - - -class AsyncAutomaticHTTPSRewritesResourceWithRawResponse: - def __init__(self, automatic_https_rewrites: AsyncAutomaticHTTPSRewritesResource) -> None: - self._automatic_https_rewrites = automatic_https_rewrites - - self.edit = async_to_raw_response_wrapper( - automatic_https_rewrites.edit, - ) - self.get = async_to_raw_response_wrapper( - automatic_https_rewrites.get, - ) - - -class AutomaticHTTPSRewritesResourceWithStreamingResponse: - def __init__(self, automatic_https_rewrites: AutomaticHTTPSRewritesResource) -> None: - self._automatic_https_rewrites = automatic_https_rewrites - - self.edit = to_streamed_response_wrapper( - automatic_https_rewrites.edit, - ) - self.get = to_streamed_response_wrapper( - automatic_https_rewrites.get, - ) - - -class AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse: - def __init__(self, automatic_https_rewrites: AsyncAutomaticHTTPSRewritesResource) -> None: - self._automatic_https_rewrites = automatic_https_rewrites - - self.edit = async_to_streamed_response_wrapper( - automatic_https_rewrites.edit, - ) - self.get = async_to_streamed_response_wrapper( - automatic_https_rewrites.get, - ) diff --git a/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py b/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py deleted file mode 100644 index 5bb239a25aa..00000000000 --- a/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py +++ /dev/null @@ -1,270 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import AutomaticPlatformOptimization, automatic_platform_optimization_edit_params -from ....types.zones.settings.automatic_platform_optimization import AutomaticPlatformOptimization -from ....types.zones.settings.automatic_platform_optimization_param import AutomaticPlatformOptimizationParam - -__all__ = ["AutomaticPlatformOptimizationResource", "AsyncAutomaticPlatformOptimizationResource"] - - -class AutomaticPlatformOptimizationResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AutomaticPlatformOptimizationResourceWithRawResponse: - return AutomaticPlatformOptimizationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AutomaticPlatformOptimizationResourceWithStreamingResponse: - return AutomaticPlatformOptimizationResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: AutomaticPlatformOptimizationParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AutomaticPlatformOptimization]: - """ - [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) - serves your WordPress site from Cloudflare's edge network and caches third-party - fonts. - - Args: - zone_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 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}/settings/automatic_platform_optimization", - body=maybe_transform( - {"value": value}, automatic_platform_optimization_edit_params.AutomaticPlatformOptimizationEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticPlatformOptimization]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticPlatformOptimization]], ResultWrapper[AutomaticPlatformOptimization]), - ) - - def get( - self, - *, - zone_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[AutomaticPlatformOptimization]: - """ - [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) - serves your WordPress site from Cloudflare's edge network and caches third-party - fonts. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/automatic_platform_optimization", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticPlatformOptimization]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticPlatformOptimization]], ResultWrapper[AutomaticPlatformOptimization]), - ) - - -class AsyncAutomaticPlatformOptimizationResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAutomaticPlatformOptimizationResourceWithRawResponse: - return AsyncAutomaticPlatformOptimizationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse: - return AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: AutomaticPlatformOptimizationParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[AutomaticPlatformOptimization]: - """ - [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) - serves your WordPress site from Cloudflare's edge network and caches third-party - fonts. - - Args: - zone_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 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}/settings/automatic_platform_optimization", - body=await async_maybe_transform( - {"value": value}, automatic_platform_optimization_edit_params.AutomaticPlatformOptimizationEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticPlatformOptimization]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticPlatformOptimization]], ResultWrapper[AutomaticPlatformOptimization]), - ) - - async def get( - self, - *, - zone_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[AutomaticPlatformOptimization]: - """ - [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) - serves your WordPress site from Cloudflare's edge network and caches third-party - fonts. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/automatic_platform_optimization", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[AutomaticPlatformOptimization]]._unwrapper, - ), - cast_to=cast(Type[Optional[AutomaticPlatformOptimization]], ResultWrapper[AutomaticPlatformOptimization]), - ) - - -class AutomaticPlatformOptimizationResourceWithRawResponse: - def __init__(self, automatic_platform_optimization: AutomaticPlatformOptimizationResource) -> None: - self._automatic_platform_optimization = automatic_platform_optimization - - self.edit = to_raw_response_wrapper( - automatic_platform_optimization.edit, - ) - self.get = to_raw_response_wrapper( - automatic_platform_optimization.get, - ) - - -class AsyncAutomaticPlatformOptimizationResourceWithRawResponse: - def __init__(self, automatic_platform_optimization: AsyncAutomaticPlatformOptimizationResource) -> None: - self._automatic_platform_optimization = automatic_platform_optimization - - self.edit = async_to_raw_response_wrapper( - automatic_platform_optimization.edit, - ) - self.get = async_to_raw_response_wrapper( - automatic_platform_optimization.get, - ) - - -class AutomaticPlatformOptimizationResourceWithStreamingResponse: - def __init__(self, automatic_platform_optimization: AutomaticPlatformOptimizationResource) -> None: - self._automatic_platform_optimization = automatic_platform_optimization - - self.edit = to_streamed_response_wrapper( - automatic_platform_optimization.edit, - ) - self.get = to_streamed_response_wrapper( - automatic_platform_optimization.get, - ) - - -class AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse: - def __init__(self, automatic_platform_optimization: AsyncAutomaticPlatformOptimizationResource) -> None: - self._automatic_platform_optimization = automatic_platform_optimization - - self.edit = async_to_streamed_response_wrapper( - automatic_platform_optimization.edit, - ) - self.get = async_to_streamed_response_wrapper( - automatic_platform_optimization.get, - ) diff --git a/src/cloudflare/resources/zones/settings/brotli.py b/src/cloudflare/resources/zones/settings/brotli.py deleted file mode 100644 index 33912623ca6..00000000000 --- a/src/cloudflare/resources/zones/settings/brotli.py +++ /dev/null @@ -1,266 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import brotli_edit_params -from ....types.zones.settings.brotli import Brotli - -__all__ = ["BrotliResource", "AsyncBrotliResource"] - - -class BrotliResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> BrotliResourceWithRawResponse: - return BrotliResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> BrotliResourceWithStreamingResponse: - return BrotliResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Brotli]: - """ - When the client requesting an asset supports the Brotli compression algorithm, - Cloudflare will serve a Brotli compressed version of the asset. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/brotli", - body=maybe_transform({"value": value}, brotli_edit_params.BrotliEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Brotli]]._unwrapper, - ), - cast_to=cast(Type[Optional[Brotli]], ResultWrapper[Brotli]), - ) - - def get( - self, - *, - zone_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[Brotli]: - """ - When the client requesting an asset supports the Brotli compression algorithm, - Cloudflare will serve a Brotli compressed version of the asset. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/brotli", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Brotli]]._unwrapper, - ), - cast_to=cast(Type[Optional[Brotli]], ResultWrapper[Brotli]), - ) - - -class AsyncBrotliResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncBrotliResourceWithRawResponse: - return AsyncBrotliResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncBrotliResourceWithStreamingResponse: - return AsyncBrotliResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Brotli]: - """ - When the client requesting an asset supports the Brotli compression algorithm, - Cloudflare will serve a Brotli compressed version of the asset. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/brotli", - body=await async_maybe_transform({"value": value}, brotli_edit_params.BrotliEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Brotli]]._unwrapper, - ), - cast_to=cast(Type[Optional[Brotli]], ResultWrapper[Brotli]), - ) - - async def get( - self, - *, - zone_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[Brotli]: - """ - When the client requesting an asset supports the Brotli compression algorithm, - Cloudflare will serve a Brotli compressed version of the asset. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/brotli", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Brotli]]._unwrapper, - ), - cast_to=cast(Type[Optional[Brotli]], ResultWrapper[Brotli]), - ) - - -class BrotliResourceWithRawResponse: - def __init__(self, brotli: BrotliResource) -> None: - self._brotli = brotli - - self.edit = to_raw_response_wrapper( - brotli.edit, - ) - self.get = to_raw_response_wrapper( - brotli.get, - ) - - -class AsyncBrotliResourceWithRawResponse: - def __init__(self, brotli: AsyncBrotliResource) -> None: - self._brotli = brotli - - self.edit = async_to_raw_response_wrapper( - brotli.edit, - ) - self.get = async_to_raw_response_wrapper( - brotli.get, - ) - - -class BrotliResourceWithStreamingResponse: - def __init__(self, brotli: BrotliResource) -> None: - self._brotli = brotli - - self.edit = to_streamed_response_wrapper( - brotli.edit, - ) - self.get = to_streamed_response_wrapper( - brotli.get, - ) - - -class AsyncBrotliResourceWithStreamingResponse: - def __init__(self, brotli: AsyncBrotliResource) -> None: - self._brotli = brotli - - self.edit = async_to_streamed_response_wrapper( - brotli.edit, - ) - self.get = async_to_streamed_response_wrapper( - brotli.get, - ) diff --git a/src/cloudflare/resources/zones/settings/browser_cache_ttl.py b/src/cloudflare/resources/zones/settings/browser_cache_ttl.py deleted file mode 100644 index 56eb8d8c62c..00000000000 --- a/src/cloudflare/resources/zones/settings/browser_cache_ttl.py +++ /dev/null @@ -1,334 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import browser_cache_ttl_edit_params -from ....types.zones.settings.browser_cache_ttl import BrowserCacheTTL - -__all__ = ["BrowserCacheTTLResource", "AsyncBrowserCacheTTLResource"] - - -class BrowserCacheTTLResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> BrowserCacheTTLResourceWithRawResponse: - return BrowserCacheTTLResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> BrowserCacheTTLResourceWithStreamingResponse: - return BrowserCacheTTLResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[BrowserCacheTTL]: - """ - Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources - will remain on your visitors' computers. Cloudflare will honor any larger times - specified by your server. - (https://support.cloudflare.com/hc/en-us/articles/200168276). - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - `Respect Existing Headers` - - 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}/settings/browser_cache_ttl", - body=maybe_transform({"value": value}, browser_cache_ttl_edit_params.BrowserCacheTTLEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCacheTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCacheTTL]], ResultWrapper[BrowserCacheTTL]), - ) - - def get( - self, - *, - zone_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[BrowserCacheTTL]: - """ - Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources - will remain on your visitors' computers. Cloudflare will honor any larger times - specified by your server. - (https://support.cloudflare.com/hc/en-us/articles/200168276). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/browser_cache_ttl", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCacheTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCacheTTL]], ResultWrapper[BrowserCacheTTL]), - ) - - -class AsyncBrowserCacheTTLResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncBrowserCacheTTLResourceWithRawResponse: - return AsyncBrowserCacheTTLResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncBrowserCacheTTLResourceWithStreamingResponse: - return AsyncBrowserCacheTTLResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[BrowserCacheTTL]: - """ - Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources - will remain on your visitors' computers. Cloudflare will honor any larger times - specified by your server. - (https://support.cloudflare.com/hc/en-us/articles/200168276). - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - `Respect Existing Headers` - - 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}/settings/browser_cache_ttl", - body=await async_maybe_transform({"value": value}, browser_cache_ttl_edit_params.BrowserCacheTTLEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCacheTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCacheTTL]], ResultWrapper[BrowserCacheTTL]), - ) - - async def get( - self, - *, - zone_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[BrowserCacheTTL]: - """ - Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources - will remain on your visitors' computers. Cloudflare will honor any larger times - specified by your server. - (https://support.cloudflare.com/hc/en-us/articles/200168276). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/browser_cache_ttl", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCacheTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCacheTTL]], ResultWrapper[BrowserCacheTTL]), - ) - - -class BrowserCacheTTLResourceWithRawResponse: - def __init__(self, browser_cache_ttl: BrowserCacheTTLResource) -> None: - self._browser_cache_ttl = browser_cache_ttl - - self.edit = to_raw_response_wrapper( - browser_cache_ttl.edit, - ) - self.get = to_raw_response_wrapper( - browser_cache_ttl.get, - ) - - -class AsyncBrowserCacheTTLResourceWithRawResponse: - def __init__(self, browser_cache_ttl: AsyncBrowserCacheTTLResource) -> None: - self._browser_cache_ttl = browser_cache_ttl - - self.edit = async_to_raw_response_wrapper( - browser_cache_ttl.edit, - ) - self.get = async_to_raw_response_wrapper( - browser_cache_ttl.get, - ) - - -class BrowserCacheTTLResourceWithStreamingResponse: - def __init__(self, browser_cache_ttl: BrowserCacheTTLResource) -> None: - self._browser_cache_ttl = browser_cache_ttl - - self.edit = to_streamed_response_wrapper( - browser_cache_ttl.edit, - ) - self.get = to_streamed_response_wrapper( - browser_cache_ttl.get, - ) - - -class AsyncBrowserCacheTTLResourceWithStreamingResponse: - def __init__(self, browser_cache_ttl: AsyncBrowserCacheTTLResource) -> None: - self._browser_cache_ttl = browser_cache_ttl - - self.edit = async_to_streamed_response_wrapper( - browser_cache_ttl.edit, - ) - self.get = async_to_streamed_response_wrapper( - browser_cache_ttl.get, - ) diff --git a/src/cloudflare/resources/zones/settings/browser_check.py b/src/cloudflare/resources/zones/settings/browser_check.py deleted file mode 100644 index 20516575677..00000000000 --- a/src/cloudflare/resources/zones/settings/browser_check.py +++ /dev/null @@ -1,278 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import browser_check_edit_params -from ....types.zones.settings.browser_check import BrowserCheck - -__all__ = ["BrowserCheckResource", "AsyncBrowserCheckResource"] - - -class BrowserCheckResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> BrowserCheckResourceWithRawResponse: - return BrowserCheckResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> BrowserCheckResourceWithStreamingResponse: - return BrowserCheckResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[BrowserCheck]: - """ - Browser Integrity Check is similar to Bad Behavior and looks for common HTTP - headers abused most commonly by spammers and denies access to your page. It will - also challenge visitors that do not have a user agent or a non standard user - agent (also commonly used by abuse bots, crawlers or visitors). - (https://support.cloudflare.com/hc/en-us/articles/200170086). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/browser_check", - body=maybe_transform({"value": value}, browser_check_edit_params.BrowserCheckEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCheck]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCheck]], ResultWrapper[BrowserCheck]), - ) - - def get( - self, - *, - zone_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[BrowserCheck]: - """ - Browser Integrity Check is similar to Bad Behavior and looks for common HTTP - headers abused most commonly by spammers and denies access to your page. It will - also challenge visitors that do not have a user agent or a non standard user - agent (also commonly used by abuse bots, crawlers or visitors). - (https://support.cloudflare.com/hc/en-us/articles/200170086). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/browser_check", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCheck]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCheck]], ResultWrapper[BrowserCheck]), - ) - - -class AsyncBrowserCheckResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncBrowserCheckResourceWithRawResponse: - return AsyncBrowserCheckResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncBrowserCheckResourceWithStreamingResponse: - return AsyncBrowserCheckResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[BrowserCheck]: - """ - Browser Integrity Check is similar to Bad Behavior and looks for common HTTP - headers abused most commonly by spammers and denies access to your page. It will - also challenge visitors that do not have a user agent or a non standard user - agent (also commonly used by abuse bots, crawlers or visitors). - (https://support.cloudflare.com/hc/en-us/articles/200170086). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/browser_check", - body=await async_maybe_transform({"value": value}, browser_check_edit_params.BrowserCheckEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCheck]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCheck]], ResultWrapper[BrowserCheck]), - ) - - async def get( - self, - *, - zone_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[BrowserCheck]: - """ - Browser Integrity Check is similar to Bad Behavior and looks for common HTTP - headers abused most commonly by spammers and denies access to your page. It will - also challenge visitors that do not have a user agent or a non standard user - agent (also commonly used by abuse bots, crawlers or visitors). - (https://support.cloudflare.com/hc/en-us/articles/200170086). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/browser_check", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[BrowserCheck]]._unwrapper, - ), - cast_to=cast(Type[Optional[BrowserCheck]], ResultWrapper[BrowserCheck]), - ) - - -class BrowserCheckResourceWithRawResponse: - def __init__(self, browser_check: BrowserCheckResource) -> None: - self._browser_check = browser_check - - self.edit = to_raw_response_wrapper( - browser_check.edit, - ) - self.get = to_raw_response_wrapper( - browser_check.get, - ) - - -class AsyncBrowserCheckResourceWithRawResponse: - def __init__(self, browser_check: AsyncBrowserCheckResource) -> None: - self._browser_check = browser_check - - self.edit = async_to_raw_response_wrapper( - browser_check.edit, - ) - self.get = async_to_raw_response_wrapper( - browser_check.get, - ) - - -class BrowserCheckResourceWithStreamingResponse: - def __init__(self, browser_check: BrowserCheckResource) -> None: - self._browser_check = browser_check - - self.edit = to_streamed_response_wrapper( - browser_check.edit, - ) - self.get = to_streamed_response_wrapper( - browser_check.get, - ) - - -class AsyncBrowserCheckResourceWithStreamingResponse: - def __init__(self, browser_check: AsyncBrowserCheckResource) -> None: - self._browser_check = browser_check - - self.edit = async_to_streamed_response_wrapper( - browser_check.edit, - ) - self.get = async_to_streamed_response_wrapper( - browser_check.get, - ) diff --git a/src/cloudflare/resources/zones/settings/cache_level.py b/src/cloudflare/resources/zones/settings/cache_level.py deleted file mode 100644 index 444c3b71f2c..00000000000 --- a/src/cloudflare/resources/zones/settings/cache_level.py +++ /dev/null @@ -1,282 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import cache_level_edit_params -from ....types.zones.settings.cache_level import CacheLevel - -__all__ = ["CacheLevelResource", "AsyncCacheLevelResource"] - - -class CacheLevelResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CacheLevelResourceWithRawResponse: - return CacheLevelResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CacheLevelResourceWithStreamingResponse: - return CacheLevelResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["aggressive", "basic", "simplified"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[CacheLevel]: - """Cache Level functions based off the setting level. - - The basic setting will cache - most static resources (i.e., css, images, and JavaScript). The simplified - setting will ignore the query string when delivering a cached resource. The - aggressive setting will cache all static resources, including ones with a query - string. (https://support.cloudflare.com/hc/en-us/articles/200168256). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/cache_level", - body=maybe_transform({"value": value}, cache_level_edit_params.CacheLevelEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CacheLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[CacheLevel]], ResultWrapper[CacheLevel]), - ) - - def get( - self, - *, - zone_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[CacheLevel]: - """Cache Level functions based off the setting level. - - The basic setting will cache - most static resources (i.e., css, images, and JavaScript). The simplified - setting will ignore the query string when delivering a cached resource. The - aggressive setting will cache all static resources, including ones with a query - string. (https://support.cloudflare.com/hc/en-us/articles/200168256). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/cache_level", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CacheLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[CacheLevel]], ResultWrapper[CacheLevel]), - ) - - -class AsyncCacheLevelResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCacheLevelResourceWithRawResponse: - return AsyncCacheLevelResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCacheLevelResourceWithStreamingResponse: - return AsyncCacheLevelResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["aggressive", "basic", "simplified"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[CacheLevel]: - """Cache Level functions based off the setting level. - - The basic setting will cache - most static resources (i.e., css, images, and JavaScript). The simplified - setting will ignore the query string when delivering a cached resource. The - aggressive setting will cache all static resources, including ones with a query - string. (https://support.cloudflare.com/hc/en-us/articles/200168256). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/cache_level", - body=await async_maybe_transform({"value": value}, cache_level_edit_params.CacheLevelEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CacheLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[CacheLevel]], ResultWrapper[CacheLevel]), - ) - - async def get( - self, - *, - zone_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[CacheLevel]: - """Cache Level functions based off the setting level. - - The basic setting will cache - most static resources (i.e., css, images, and JavaScript). The simplified - setting will ignore the query string when delivering a cached resource. The - aggressive setting will cache all static resources, including ones with a query - string. (https://support.cloudflare.com/hc/en-us/articles/200168256). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/cache_level", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CacheLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[CacheLevel]], ResultWrapper[CacheLevel]), - ) - - -class CacheLevelResourceWithRawResponse: - def __init__(self, cache_level: CacheLevelResource) -> None: - self._cache_level = cache_level - - self.edit = to_raw_response_wrapper( - cache_level.edit, - ) - self.get = to_raw_response_wrapper( - cache_level.get, - ) - - -class AsyncCacheLevelResourceWithRawResponse: - def __init__(self, cache_level: AsyncCacheLevelResource) -> None: - self._cache_level = cache_level - - self.edit = async_to_raw_response_wrapper( - cache_level.edit, - ) - self.get = async_to_raw_response_wrapper( - cache_level.get, - ) - - -class CacheLevelResourceWithStreamingResponse: - def __init__(self, cache_level: CacheLevelResource) -> None: - self._cache_level = cache_level - - self.edit = to_streamed_response_wrapper( - cache_level.edit, - ) - self.get = to_streamed_response_wrapper( - cache_level.get, - ) - - -class AsyncCacheLevelResourceWithStreamingResponse: - def __init__(self, cache_level: AsyncCacheLevelResource) -> None: - self._cache_level = cache_level - - self.edit = async_to_streamed_response_wrapper( - cache_level.edit, - ) - self.get = async_to_streamed_response_wrapper( - cache_level.get, - ) diff --git a/src/cloudflare/resources/zones/settings/challenge_ttl.py b/src/cloudflare/resources/zones/settings/challenge_ttl.py deleted file mode 100644 index 7730173627d..00000000000 --- a/src/cloudflare/resources/zones/settings/challenge_ttl.py +++ /dev/null @@ -1,278 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import challenge_ttl_edit_params -from ....types.zones.settings.challenge_ttl import ChallengeTTL - -__all__ = ["ChallengeTTLResource", "AsyncChallengeTTLResource"] - - -class ChallengeTTLResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ChallengeTTLResourceWithRawResponse: - return ChallengeTTLResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ChallengeTTLResourceWithStreamingResponse: - return ChallengeTTLResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ChallengeTTL]: - """ - Specify how long a visitor is allowed access to your site after successfully - completing a challenge (such as a CAPTCHA). After the TTL has expired the - visitor will have to complete a new challenge. We recommend a 15 - 45 minute - setting and will attempt to honor any setting above 45 minutes. - (https://support.cloudflare.com/hc/en-us/articles/200170136). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/challenge_ttl", - body=maybe_transform({"value": value}, challenge_ttl_edit_params.ChallengeTTLEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ChallengeTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[ChallengeTTL]], ResultWrapper[ChallengeTTL]), - ) - - def get( - self, - *, - zone_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[ChallengeTTL]: - """ - Specify how long a visitor is allowed access to your site after successfully - completing a challenge (such as a CAPTCHA). After the TTL has expired the - visitor will have to complete a new challenge. We recommend a 15 - 45 minute - setting and will attempt to honor any setting above 45 minutes. - (https://support.cloudflare.com/hc/en-us/articles/200170136). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/challenge_ttl", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ChallengeTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[ChallengeTTL]], ResultWrapper[ChallengeTTL]), - ) - - -class AsyncChallengeTTLResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncChallengeTTLResourceWithRawResponse: - return AsyncChallengeTTLResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncChallengeTTLResourceWithStreamingResponse: - return AsyncChallengeTTLResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ChallengeTTL]: - """ - Specify how long a visitor is allowed access to your site after successfully - completing a challenge (such as a CAPTCHA). After the TTL has expired the - visitor will have to complete a new challenge. We recommend a 15 - 45 minute - setting and will attempt to honor any setting above 45 minutes. - (https://support.cloudflare.com/hc/en-us/articles/200170136). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/challenge_ttl", - body=await async_maybe_transform({"value": value}, challenge_ttl_edit_params.ChallengeTTLEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ChallengeTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[ChallengeTTL]], ResultWrapper[ChallengeTTL]), - ) - - async def get( - self, - *, - zone_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[ChallengeTTL]: - """ - Specify how long a visitor is allowed access to your site after successfully - completing a challenge (such as a CAPTCHA). After the TTL has expired the - visitor will have to complete a new challenge. We recommend a 15 - 45 minute - setting and will attempt to honor any setting above 45 minutes. - (https://support.cloudflare.com/hc/en-us/articles/200170136). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/challenge_ttl", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ChallengeTTL]]._unwrapper, - ), - cast_to=cast(Type[Optional[ChallengeTTL]], ResultWrapper[ChallengeTTL]), - ) - - -class ChallengeTTLResourceWithRawResponse: - def __init__(self, challenge_ttl: ChallengeTTLResource) -> None: - self._challenge_ttl = challenge_ttl - - self.edit = to_raw_response_wrapper( - challenge_ttl.edit, - ) - self.get = to_raw_response_wrapper( - challenge_ttl.get, - ) - - -class AsyncChallengeTTLResourceWithRawResponse: - def __init__(self, challenge_ttl: AsyncChallengeTTLResource) -> None: - self._challenge_ttl = challenge_ttl - - self.edit = async_to_raw_response_wrapper( - challenge_ttl.edit, - ) - self.get = async_to_raw_response_wrapper( - challenge_ttl.get, - ) - - -class ChallengeTTLResourceWithStreamingResponse: - def __init__(self, challenge_ttl: ChallengeTTLResource) -> None: - self._challenge_ttl = challenge_ttl - - self.edit = to_streamed_response_wrapper( - challenge_ttl.edit, - ) - self.get = to_streamed_response_wrapper( - challenge_ttl.get, - ) - - -class AsyncChallengeTTLResourceWithStreamingResponse: - def __init__(self, challenge_ttl: AsyncChallengeTTLResource) -> None: - self._challenge_ttl = challenge_ttl - - self.edit = async_to_streamed_response_wrapper( - challenge_ttl.edit, - ) - self.get = async_to_streamed_response_wrapper( - challenge_ttl.get, - ) diff --git a/src/cloudflare/resources/zones/settings/ciphers.py b/src/cloudflare/resources/zones/settings/ciphers.py deleted file mode 100644 index c17128d464a..00000000000 --- a/src/cloudflare/resources/zones/settings/ciphers.py +++ /dev/null @@ -1,261 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import cipher_edit_params -from ....types.zones.settings.ciphers import Ciphers - -__all__ = ["CiphersResource", "AsyncCiphersResource"] - - -class CiphersResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CiphersResourceWithRawResponse: - return CiphersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CiphersResourceWithStreamingResponse: - return CiphersResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: List[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[Ciphers]: - """ - Changes ciphers setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/ciphers", - body=maybe_transform({"value": value}, cipher_edit_params.CipherEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Ciphers]]._unwrapper, - ), - cast_to=cast(Type[Optional[Ciphers]], ResultWrapper[Ciphers]), - ) - - def get( - self, - *, - zone_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[Ciphers]: - """ - Gets ciphers setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/ciphers", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Ciphers]]._unwrapper, - ), - cast_to=cast(Type[Optional[Ciphers]], ResultWrapper[Ciphers]), - ) - - -class AsyncCiphersResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCiphersResourceWithRawResponse: - return AsyncCiphersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCiphersResourceWithStreamingResponse: - return AsyncCiphersResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: List[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[Ciphers]: - """ - Changes ciphers setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/ciphers", - body=await async_maybe_transform({"value": value}, cipher_edit_params.CipherEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Ciphers]]._unwrapper, - ), - cast_to=cast(Type[Optional[Ciphers]], ResultWrapper[Ciphers]), - ) - - async def get( - self, - *, - zone_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[Ciphers]: - """ - Gets ciphers setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/ciphers", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Ciphers]]._unwrapper, - ), - cast_to=cast(Type[Optional[Ciphers]], ResultWrapper[Ciphers]), - ) - - -class CiphersResourceWithRawResponse: - def __init__(self, ciphers: CiphersResource) -> None: - self._ciphers = ciphers - - self.edit = to_raw_response_wrapper( - ciphers.edit, - ) - self.get = to_raw_response_wrapper( - ciphers.get, - ) - - -class AsyncCiphersResourceWithRawResponse: - def __init__(self, ciphers: AsyncCiphersResource) -> None: - self._ciphers = ciphers - - self.edit = async_to_raw_response_wrapper( - ciphers.edit, - ) - self.get = async_to_raw_response_wrapper( - ciphers.get, - ) - - -class CiphersResourceWithStreamingResponse: - def __init__(self, ciphers: CiphersResource) -> None: - self._ciphers = ciphers - - self.edit = to_streamed_response_wrapper( - ciphers.edit, - ) - self.get = to_streamed_response_wrapper( - ciphers.get, - ) - - -class AsyncCiphersResourceWithStreamingResponse: - def __init__(self, ciphers: AsyncCiphersResource) -> None: - self._ciphers = ciphers - - self.edit = async_to_streamed_response_wrapper( - ciphers.edit, - ) - self.get = async_to_streamed_response_wrapper( - ciphers.get, - ) diff --git a/src/cloudflare/resources/zones/settings/development_mode.py b/src/cloudflare/resources/zones/settings/development_mode.py deleted file mode 100644 index d5a609c139a..00000000000 --- a/src/cloudflare/resources/zones/settings/development_mode.py +++ /dev/null @@ -1,282 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import development_mode_edit_params -from ....types.zones.settings.development_mode import DevelopmentMode - -__all__ = ["DevelopmentModeResource", "AsyncDevelopmentModeResource"] - - -class DevelopmentModeResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> DevelopmentModeResourceWithRawResponse: - return DevelopmentModeResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> DevelopmentModeResourceWithStreamingResponse: - return DevelopmentModeResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[DevelopmentMode]: - """ - Development Mode temporarily allows you to enter development mode for your - websites if you need to make changes to your site. This will bypass Cloudflare's - accelerated cache and slow down your site, but is useful if you are making - changes to cacheable content (like images, css, or JavaScript) and would like to - see those changes right away. Once entered, development mode will last for 3 - hours and then automatically toggle off. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/development_mode", - body=maybe_transform({"value": value}, development_mode_edit_params.DevelopmentModeEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[DevelopmentMode]]._unwrapper, - ), - cast_to=cast(Type[Optional[DevelopmentMode]], ResultWrapper[DevelopmentMode]), - ) - - def get( - self, - *, - zone_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[DevelopmentMode]: - """ - Development Mode temporarily allows you to enter development mode for your - websites if you need to make changes to your site. This will bypass Cloudflare's - accelerated cache and slow down your site, but is useful if you are making - changes to cacheable content (like images, css, or JavaScript) and would like to - see those changes right away. Once entered, development mode will last for 3 - hours and then automatically toggle off. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/development_mode", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[DevelopmentMode]]._unwrapper, - ), - cast_to=cast(Type[Optional[DevelopmentMode]], ResultWrapper[DevelopmentMode]), - ) - - -class AsyncDevelopmentModeResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncDevelopmentModeResourceWithRawResponse: - return AsyncDevelopmentModeResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncDevelopmentModeResourceWithStreamingResponse: - return AsyncDevelopmentModeResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[DevelopmentMode]: - """ - Development Mode temporarily allows you to enter development mode for your - websites if you need to make changes to your site. This will bypass Cloudflare's - accelerated cache and slow down your site, but is useful if you are making - changes to cacheable content (like images, css, or JavaScript) and would like to - see those changes right away. Once entered, development mode will last for 3 - hours and then automatically toggle off. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/development_mode", - body=await async_maybe_transform({"value": value}, development_mode_edit_params.DevelopmentModeEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[DevelopmentMode]]._unwrapper, - ), - cast_to=cast(Type[Optional[DevelopmentMode]], ResultWrapper[DevelopmentMode]), - ) - - async def get( - self, - *, - zone_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[DevelopmentMode]: - """ - Development Mode temporarily allows you to enter development mode for your - websites if you need to make changes to your site. This will bypass Cloudflare's - accelerated cache and slow down your site, but is useful if you are making - changes to cacheable content (like images, css, or JavaScript) and would like to - see those changes right away. Once entered, development mode will last for 3 - hours and then automatically toggle off. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/development_mode", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[DevelopmentMode]]._unwrapper, - ), - cast_to=cast(Type[Optional[DevelopmentMode]], ResultWrapper[DevelopmentMode]), - ) - - -class DevelopmentModeResourceWithRawResponse: - def __init__(self, development_mode: DevelopmentModeResource) -> None: - self._development_mode = development_mode - - self.edit = to_raw_response_wrapper( - development_mode.edit, - ) - self.get = to_raw_response_wrapper( - development_mode.get, - ) - - -class AsyncDevelopmentModeResourceWithRawResponse: - def __init__(self, development_mode: AsyncDevelopmentModeResource) -> None: - self._development_mode = development_mode - - self.edit = async_to_raw_response_wrapper( - development_mode.edit, - ) - self.get = async_to_raw_response_wrapper( - development_mode.get, - ) - - -class DevelopmentModeResourceWithStreamingResponse: - def __init__(self, development_mode: DevelopmentModeResource) -> None: - self._development_mode = development_mode - - self.edit = to_streamed_response_wrapper( - development_mode.edit, - ) - self.get = to_streamed_response_wrapper( - development_mode.get, - ) - - -class AsyncDevelopmentModeResourceWithStreamingResponse: - def __init__(self, development_mode: AsyncDevelopmentModeResource) -> None: - self._development_mode = development_mode - - self.edit = async_to_streamed_response_wrapper( - development_mode.edit, - ) - self.get = async_to_streamed_response_wrapper( - development_mode.get, - ) diff --git a/src/cloudflare/resources/zones/settings/early_hints.py b/src/cloudflare/resources/zones/settings/early_hints.py deleted file mode 100644 index 4c751097ced..00000000000 --- a/src/cloudflare/resources/zones/settings/early_hints.py +++ /dev/null @@ -1,274 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import early_hint_edit_params -from ....types.zones.settings.early_hints import EarlyHints - -__all__ = ["EarlyHintsResource", "AsyncEarlyHintsResource"] - - -class EarlyHintsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> EarlyHintsResourceWithRawResponse: - return EarlyHintsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> EarlyHintsResourceWithStreamingResponse: - return EarlyHintsResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[EarlyHints]: - """ - When enabled, Cloudflare will attempt to speed up overall page loads by serving - `103` responses with `Link` headers from the final response. Refer to - [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for - more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/early_hints", - body=maybe_transform({"value": value}, early_hint_edit_params.EarlyHintEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EarlyHints]]._unwrapper, - ), - cast_to=cast(Type[Optional[EarlyHints]], ResultWrapper[EarlyHints]), - ) - - def get( - self, - *, - zone_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[EarlyHints]: - """ - When enabled, Cloudflare will attempt to speed up overall page loads by serving - `103` responses with `Link` headers from the final response. Refer to - [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for - more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/early_hints", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EarlyHints]]._unwrapper, - ), - cast_to=cast(Type[Optional[EarlyHints]], ResultWrapper[EarlyHints]), - ) - - -class AsyncEarlyHintsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncEarlyHintsResourceWithRawResponse: - return AsyncEarlyHintsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncEarlyHintsResourceWithStreamingResponse: - return AsyncEarlyHintsResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[EarlyHints]: - """ - When enabled, Cloudflare will attempt to speed up overall page loads by serving - `103` responses with `Link` headers from the final response. Refer to - [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for - more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/early_hints", - body=await async_maybe_transform({"value": value}, early_hint_edit_params.EarlyHintEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EarlyHints]]._unwrapper, - ), - cast_to=cast(Type[Optional[EarlyHints]], ResultWrapper[EarlyHints]), - ) - - async def get( - self, - *, - zone_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[EarlyHints]: - """ - When enabled, Cloudflare will attempt to speed up overall page loads by serving - `103` responses with `Link` headers from the final response. Refer to - [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for - more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/early_hints", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EarlyHints]]._unwrapper, - ), - cast_to=cast(Type[Optional[EarlyHints]], ResultWrapper[EarlyHints]), - ) - - -class EarlyHintsResourceWithRawResponse: - def __init__(self, early_hints: EarlyHintsResource) -> None: - self._early_hints = early_hints - - self.edit = to_raw_response_wrapper( - early_hints.edit, - ) - self.get = to_raw_response_wrapper( - early_hints.get, - ) - - -class AsyncEarlyHintsResourceWithRawResponse: - def __init__(self, early_hints: AsyncEarlyHintsResource) -> None: - self._early_hints = early_hints - - self.edit = async_to_raw_response_wrapper( - early_hints.edit, - ) - self.get = async_to_raw_response_wrapper( - early_hints.get, - ) - - -class EarlyHintsResourceWithStreamingResponse: - def __init__(self, early_hints: EarlyHintsResource) -> None: - self._early_hints = early_hints - - self.edit = to_streamed_response_wrapper( - early_hints.edit, - ) - self.get = to_streamed_response_wrapper( - early_hints.get, - ) - - -class AsyncEarlyHintsResourceWithStreamingResponse: - def __init__(self, early_hints: AsyncEarlyHintsResource) -> None: - self._early_hints = early_hints - - self.edit = async_to_streamed_response_wrapper( - early_hints.edit, - ) - self.get = async_to_streamed_response_wrapper( - early_hints.get, - ) diff --git a/src/cloudflare/resources/zones/settings/email_obfuscation.py b/src/cloudflare/resources/zones/settings/email_obfuscation.py deleted file mode 100644 index da8a7e0e288..00000000000 --- a/src/cloudflare/resources/zones/settings/email_obfuscation.py +++ /dev/null @@ -1,268 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import email_obfuscation_edit_params -from ....types.zones.settings.email_obfuscation import EmailObfuscation - -__all__ = ["EmailObfuscationResource", "AsyncEmailObfuscationResource"] - - -class EmailObfuscationResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> EmailObfuscationResourceWithRawResponse: - return EmailObfuscationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> EmailObfuscationResourceWithStreamingResponse: - return EmailObfuscationResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[EmailObfuscation]: - """ - Encrypt email adresses on your web page from bots, while keeping them visible to - humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/email_obfuscation", - body=maybe_transform({"value": value}, email_obfuscation_edit_params.EmailObfuscationEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EmailObfuscation]]._unwrapper, - ), - cast_to=cast(Type[Optional[EmailObfuscation]], ResultWrapper[EmailObfuscation]), - ) - - def get( - self, - *, - zone_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[EmailObfuscation]: - """ - Encrypt email adresses on your web page from bots, while keeping them visible to - humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/email_obfuscation", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EmailObfuscation]]._unwrapper, - ), - cast_to=cast(Type[Optional[EmailObfuscation]], ResultWrapper[EmailObfuscation]), - ) - - -class AsyncEmailObfuscationResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncEmailObfuscationResourceWithRawResponse: - return AsyncEmailObfuscationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncEmailObfuscationResourceWithStreamingResponse: - return AsyncEmailObfuscationResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[EmailObfuscation]: - """ - Encrypt email adresses on your web page from bots, while keeping them visible to - humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/email_obfuscation", - body=await async_maybe_transform( - {"value": value}, email_obfuscation_edit_params.EmailObfuscationEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EmailObfuscation]]._unwrapper, - ), - cast_to=cast(Type[Optional[EmailObfuscation]], ResultWrapper[EmailObfuscation]), - ) - - async def get( - self, - *, - zone_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[EmailObfuscation]: - """ - Encrypt email adresses on your web page from bots, while keeping them visible to - humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/email_obfuscation", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[EmailObfuscation]]._unwrapper, - ), - cast_to=cast(Type[Optional[EmailObfuscation]], ResultWrapper[EmailObfuscation]), - ) - - -class EmailObfuscationResourceWithRawResponse: - def __init__(self, email_obfuscation: EmailObfuscationResource) -> None: - self._email_obfuscation = email_obfuscation - - self.edit = to_raw_response_wrapper( - email_obfuscation.edit, - ) - self.get = to_raw_response_wrapper( - email_obfuscation.get, - ) - - -class AsyncEmailObfuscationResourceWithRawResponse: - def __init__(self, email_obfuscation: AsyncEmailObfuscationResource) -> None: - self._email_obfuscation = email_obfuscation - - self.edit = async_to_raw_response_wrapper( - email_obfuscation.edit, - ) - self.get = async_to_raw_response_wrapper( - email_obfuscation.get, - ) - - -class EmailObfuscationResourceWithStreamingResponse: - def __init__(self, email_obfuscation: EmailObfuscationResource) -> None: - self._email_obfuscation = email_obfuscation - - self.edit = to_streamed_response_wrapper( - email_obfuscation.edit, - ) - self.get = to_streamed_response_wrapper( - email_obfuscation.get, - ) - - -class AsyncEmailObfuscationResourceWithStreamingResponse: - def __init__(self, email_obfuscation: AsyncEmailObfuscationResource) -> None: - self._email_obfuscation = email_obfuscation - - self.edit = async_to_streamed_response_wrapper( - email_obfuscation.edit, - ) - self.get = async_to_streamed_response_wrapper( - email_obfuscation.get, - ) diff --git a/src/cloudflare/resources/zones/settings/h2_prioritization.py b/src/cloudflare/resources/zones/settings/h2_prioritization.py deleted file mode 100644 index 51c445962bc..00000000000 --- a/src/cloudflare/resources/zones/settings/h2_prioritization.py +++ /dev/null @@ -1,268 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import H2Prioritization, h2_prioritization_edit_params -from ....types.zones.settings.h2_prioritization import H2Prioritization -from ....types.zones.settings.h2_prioritization_param import H2PrioritizationParam - -__all__ = ["H2PrioritizationResource", "AsyncH2PrioritizationResource"] - - -class H2PrioritizationResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> H2PrioritizationResourceWithRawResponse: - return H2PrioritizationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> H2PrioritizationResourceWithStreamingResponse: - return H2PrioritizationResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: H2PrioritizationParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[H2Prioritization]: - """ - Gets HTTP/2 Edge Prioritization setting. - - Args: - zone_id: Identifier - - value: HTTP/2 Edge Prioritization optimises the delivery of resources served through - HTTP/2 to improve page load performance. It also supports fine control of - content delivery when used in conjunction with Workers. - - 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}/settings/h2_prioritization", - body=maybe_transform({"value": value}, h2_prioritization_edit_params.H2PrioritizationEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[H2Prioritization]]._unwrapper, - ), - cast_to=cast(Type[Optional[H2Prioritization]], ResultWrapper[H2Prioritization]), - ) - - def get( - self, - *, - zone_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[H2Prioritization]: - """ - Gets HTTP/2 Edge Prioritization setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/h2_prioritization", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[H2Prioritization]]._unwrapper, - ), - cast_to=cast(Type[Optional[H2Prioritization]], ResultWrapper[H2Prioritization]), - ) - - -class AsyncH2PrioritizationResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncH2PrioritizationResourceWithRawResponse: - return AsyncH2PrioritizationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncH2PrioritizationResourceWithStreamingResponse: - return AsyncH2PrioritizationResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: H2PrioritizationParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[H2Prioritization]: - """ - Gets HTTP/2 Edge Prioritization setting. - - Args: - zone_id: Identifier - - value: HTTP/2 Edge Prioritization optimises the delivery of resources served through - HTTP/2 to improve page load performance. It also supports fine control of - content delivery when used in conjunction with Workers. - - 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}/settings/h2_prioritization", - body=await async_maybe_transform( - {"value": value}, h2_prioritization_edit_params.H2PrioritizationEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[H2Prioritization]]._unwrapper, - ), - cast_to=cast(Type[Optional[H2Prioritization]], ResultWrapper[H2Prioritization]), - ) - - async def get( - self, - *, - zone_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[H2Prioritization]: - """ - Gets HTTP/2 Edge Prioritization setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/h2_prioritization", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[H2Prioritization]]._unwrapper, - ), - cast_to=cast(Type[Optional[H2Prioritization]], ResultWrapper[H2Prioritization]), - ) - - -class H2PrioritizationResourceWithRawResponse: - def __init__(self, h2_prioritization: H2PrioritizationResource) -> None: - self._h2_prioritization = h2_prioritization - - self.edit = to_raw_response_wrapper( - h2_prioritization.edit, - ) - self.get = to_raw_response_wrapper( - h2_prioritization.get, - ) - - -class AsyncH2PrioritizationResourceWithRawResponse: - def __init__(self, h2_prioritization: AsyncH2PrioritizationResource) -> None: - self._h2_prioritization = h2_prioritization - - self.edit = async_to_raw_response_wrapper( - h2_prioritization.edit, - ) - self.get = async_to_raw_response_wrapper( - h2_prioritization.get, - ) - - -class H2PrioritizationResourceWithStreamingResponse: - def __init__(self, h2_prioritization: H2PrioritizationResource) -> None: - self._h2_prioritization = h2_prioritization - - self.edit = to_streamed_response_wrapper( - h2_prioritization.edit, - ) - self.get = to_streamed_response_wrapper( - h2_prioritization.get, - ) - - -class AsyncH2PrioritizationResourceWithStreamingResponse: - def __init__(self, h2_prioritization: AsyncH2PrioritizationResource) -> None: - self._h2_prioritization = h2_prioritization - - self.edit = async_to_streamed_response_wrapper( - h2_prioritization.edit, - ) - self.get = async_to_streamed_response_wrapper( - h2_prioritization.get, - ) diff --git a/src/cloudflare/resources/zones/settings/hotlink_protection.py b/src/cloudflare/resources/zones/settings/hotlink_protection.py deleted file mode 100644 index 0b42ae6747d..00000000000 --- a/src/cloudflare/resources/zones/settings/hotlink_protection.py +++ /dev/null @@ -1,288 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import hotlink_protection_edit_params -from ....types.zones.settings.hotlink_protection import HotlinkProtection - -__all__ = ["HotlinkProtectionResource", "AsyncHotlinkProtectionResource"] - - -class HotlinkProtectionResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> HotlinkProtectionResourceWithRawResponse: - return HotlinkProtectionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> HotlinkProtectionResourceWithStreamingResponse: - return HotlinkProtectionResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[HotlinkProtection]: - """ - When enabled, the Hotlink Protection option ensures that other sites cannot suck - up your bandwidth by building pages that use images hosted on your site. Anytime - a request for an image on your site hits Cloudflare, we check to ensure that - it's not another site requesting them. People will still be able to download and - view images from your page, but other sites won't be able to steal them for use - on their own pages. - (https://support.cloudflare.com/hc/en-us/articles/200170026). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/hotlink_protection", - body=maybe_transform({"value": value}, hotlink_protection_edit_params.HotlinkProtectionEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HotlinkProtection]]._unwrapper, - ), - cast_to=cast(Type[Optional[HotlinkProtection]], ResultWrapper[HotlinkProtection]), - ) - - def get( - self, - *, - zone_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[HotlinkProtection]: - """ - When enabled, the Hotlink Protection option ensures that other sites cannot suck - up your bandwidth by building pages that use images hosted on your site. Anytime - a request for an image on your site hits Cloudflare, we check to ensure that - it's not another site requesting them. People will still be able to download and - view images from your page, but other sites won't be able to steal them for use - on their own pages. - (https://support.cloudflare.com/hc/en-us/articles/200170026). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/hotlink_protection", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HotlinkProtection]]._unwrapper, - ), - cast_to=cast(Type[Optional[HotlinkProtection]], ResultWrapper[HotlinkProtection]), - ) - - -class AsyncHotlinkProtectionResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncHotlinkProtectionResourceWithRawResponse: - return AsyncHotlinkProtectionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncHotlinkProtectionResourceWithStreamingResponse: - return AsyncHotlinkProtectionResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[HotlinkProtection]: - """ - When enabled, the Hotlink Protection option ensures that other sites cannot suck - up your bandwidth by building pages that use images hosted on your site. Anytime - a request for an image on your site hits Cloudflare, we check to ensure that - it's not another site requesting them. People will still be able to download and - view images from your page, but other sites won't be able to steal them for use - on their own pages. - (https://support.cloudflare.com/hc/en-us/articles/200170026). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/hotlink_protection", - body=await async_maybe_transform( - {"value": value}, hotlink_protection_edit_params.HotlinkProtectionEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HotlinkProtection]]._unwrapper, - ), - cast_to=cast(Type[Optional[HotlinkProtection]], ResultWrapper[HotlinkProtection]), - ) - - async def get( - self, - *, - zone_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[HotlinkProtection]: - """ - When enabled, the Hotlink Protection option ensures that other sites cannot suck - up your bandwidth by building pages that use images hosted on your site. Anytime - a request for an image on your site hits Cloudflare, we check to ensure that - it's not another site requesting them. People will still be able to download and - view images from your page, but other sites won't be able to steal them for use - on their own pages. - (https://support.cloudflare.com/hc/en-us/articles/200170026). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/hotlink_protection", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HotlinkProtection]]._unwrapper, - ), - cast_to=cast(Type[Optional[HotlinkProtection]], ResultWrapper[HotlinkProtection]), - ) - - -class HotlinkProtectionResourceWithRawResponse: - def __init__(self, hotlink_protection: HotlinkProtectionResource) -> None: - self._hotlink_protection = hotlink_protection - - self.edit = to_raw_response_wrapper( - hotlink_protection.edit, - ) - self.get = to_raw_response_wrapper( - hotlink_protection.get, - ) - - -class AsyncHotlinkProtectionResourceWithRawResponse: - def __init__(self, hotlink_protection: AsyncHotlinkProtectionResource) -> None: - self._hotlink_protection = hotlink_protection - - self.edit = async_to_raw_response_wrapper( - hotlink_protection.edit, - ) - self.get = async_to_raw_response_wrapper( - hotlink_protection.get, - ) - - -class HotlinkProtectionResourceWithStreamingResponse: - def __init__(self, hotlink_protection: HotlinkProtectionResource) -> None: - self._hotlink_protection = hotlink_protection - - self.edit = to_streamed_response_wrapper( - hotlink_protection.edit, - ) - self.get = to_streamed_response_wrapper( - hotlink_protection.get, - ) - - -class AsyncHotlinkProtectionResourceWithStreamingResponse: - def __init__(self, hotlink_protection: AsyncHotlinkProtectionResource) -> None: - self._hotlink_protection = hotlink_protection - - self.edit = async_to_streamed_response_wrapper( - hotlink_protection.edit, - ) - self.get = async_to_streamed_response_wrapper( - hotlink_protection.get, - ) diff --git a/src/cloudflare/resources/zones/settings/http2.py b/src/cloudflare/resources/zones/settings/http2.py deleted file mode 100644 index 8b545d2e20d..00000000000 --- a/src/cloudflare/resources/zones/settings/http2.py +++ /dev/null @@ -1,262 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import http2_edit_params -from ....types.zones.settings.http2 import HTTP2 - -__all__ = ["HTTP2Resource", "AsyncHTTP2Resource"] - - -class HTTP2Resource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> HTTP2ResourceWithRawResponse: - return HTTP2ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> HTTP2ResourceWithStreamingResponse: - return HTTP2ResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[HTTP2]: - """ - Value of the HTTP2 setting. - - Args: - zone_id: Identifier - - value: Value of the HTTP2 setting. - - 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}/settings/http2", - body=maybe_transform({"value": value}, http2_edit_params.HTTP2EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP2]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP2]], ResultWrapper[HTTP2]), - ) - - def get( - self, - *, - zone_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[HTTP2]: - """ - Value of the HTTP2 setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/http2", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP2]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP2]], ResultWrapper[HTTP2]), - ) - - -class AsyncHTTP2Resource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncHTTP2ResourceWithRawResponse: - return AsyncHTTP2ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncHTTP2ResourceWithStreamingResponse: - return AsyncHTTP2ResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[HTTP2]: - """ - Value of the HTTP2 setting. - - Args: - zone_id: Identifier - - value: Value of the HTTP2 setting. - - 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}/settings/http2", - body=await async_maybe_transform({"value": value}, http2_edit_params.HTTP2EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP2]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP2]], ResultWrapper[HTTP2]), - ) - - async def get( - self, - *, - zone_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[HTTP2]: - """ - Value of the HTTP2 setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/http2", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP2]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP2]], ResultWrapper[HTTP2]), - ) - - -class HTTP2ResourceWithRawResponse: - def __init__(self, http2: HTTP2Resource) -> None: - self._http2 = http2 - - self.edit = to_raw_response_wrapper( - http2.edit, - ) - self.get = to_raw_response_wrapper( - http2.get, - ) - - -class AsyncHTTP2ResourceWithRawResponse: - def __init__(self, http2: AsyncHTTP2Resource) -> None: - self._http2 = http2 - - self.edit = async_to_raw_response_wrapper( - http2.edit, - ) - self.get = async_to_raw_response_wrapper( - http2.get, - ) - - -class HTTP2ResourceWithStreamingResponse: - def __init__(self, http2: HTTP2Resource) -> None: - self._http2 = http2 - - self.edit = to_streamed_response_wrapper( - http2.edit, - ) - self.get = to_streamed_response_wrapper( - http2.get, - ) - - -class AsyncHTTP2ResourceWithStreamingResponse: - def __init__(self, http2: AsyncHTTP2Resource) -> None: - self._http2 = http2 - - self.edit = async_to_streamed_response_wrapper( - http2.edit, - ) - self.get = async_to_streamed_response_wrapper( - http2.get, - ) diff --git a/src/cloudflare/resources/zones/settings/http3.py b/src/cloudflare/resources/zones/settings/http3.py deleted file mode 100644 index cd32293b83a..00000000000 --- a/src/cloudflare/resources/zones/settings/http3.py +++ /dev/null @@ -1,262 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import http3_edit_params -from ....types.zones.settings.http3 import HTTP3 - -__all__ = ["HTTP3Resource", "AsyncHTTP3Resource"] - - -class HTTP3Resource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> HTTP3ResourceWithRawResponse: - return HTTP3ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> HTTP3ResourceWithStreamingResponse: - return HTTP3ResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[HTTP3]: - """ - Value of the HTTP3 setting. - - Args: - zone_id: Identifier - - value: Value of the HTTP3 setting. - - 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}/settings/http3", - body=maybe_transform({"value": value}, http3_edit_params.HTTP3EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP3]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP3]], ResultWrapper[HTTP3]), - ) - - def get( - self, - *, - zone_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[HTTP3]: - """ - Value of the HTTP3 setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/http3", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP3]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP3]], ResultWrapper[HTTP3]), - ) - - -class AsyncHTTP3Resource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncHTTP3ResourceWithRawResponse: - return AsyncHTTP3ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncHTTP3ResourceWithStreamingResponse: - return AsyncHTTP3ResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[HTTP3]: - """ - Value of the HTTP3 setting. - - Args: - zone_id: Identifier - - value: Value of the HTTP3 setting. - - 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}/settings/http3", - body=await async_maybe_transform({"value": value}, http3_edit_params.HTTP3EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP3]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP3]], ResultWrapper[HTTP3]), - ) - - async def get( - self, - *, - zone_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[HTTP3]: - """ - Value of the HTTP3 setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/http3", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[HTTP3]]._unwrapper, - ), - cast_to=cast(Type[Optional[HTTP3]], ResultWrapper[HTTP3]), - ) - - -class HTTP3ResourceWithRawResponse: - def __init__(self, http3: HTTP3Resource) -> None: - self._http3 = http3 - - self.edit = to_raw_response_wrapper( - http3.edit, - ) - self.get = to_raw_response_wrapper( - http3.get, - ) - - -class AsyncHTTP3ResourceWithRawResponse: - def __init__(self, http3: AsyncHTTP3Resource) -> None: - self._http3 = http3 - - self.edit = async_to_raw_response_wrapper( - http3.edit, - ) - self.get = async_to_raw_response_wrapper( - http3.get, - ) - - -class HTTP3ResourceWithStreamingResponse: - def __init__(self, http3: HTTP3Resource) -> None: - self._http3 = http3 - - self.edit = to_streamed_response_wrapper( - http3.edit, - ) - self.get = to_streamed_response_wrapper( - http3.get, - ) - - -class AsyncHTTP3ResourceWithStreamingResponse: - def __init__(self, http3: AsyncHTTP3Resource) -> None: - self._http3 = http3 - - self.edit = async_to_streamed_response_wrapper( - http3.edit, - ) - self.get = async_to_streamed_response_wrapper( - http3.get, - ) diff --git a/src/cloudflare/resources/zones/settings/image_resizing.py b/src/cloudflare/resources/zones/settings/image_resizing.py deleted file mode 100644 index 417638b4d67..00000000000 --- a/src/cloudflare/resources/zones/settings/image_resizing.py +++ /dev/null @@ -1,280 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import ImageResizing, image_resizing_edit_params -from ....types.zones.settings.image_resizing import ImageResizing -from ....types.zones.settings.image_resizing_param import ImageResizingParam - -__all__ = ["ImageResizingResource", "AsyncImageResizingResource"] - - -class ImageResizingResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ImageResizingResourceWithRawResponse: - return ImageResizingResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ImageResizingResourceWithStreamingResponse: - return ImageResizingResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: ImageResizingParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ImageResizing]: - """ - Image Resizing provides on-demand resizing, conversion and optimisation for - images served through Cloudflare's network. Refer to the - [Image Resizing documentation](https://developers.cloudflare.com/images/) for - more information. - - Args: - zone_id: Identifier - - value: Image Resizing provides on-demand resizing, conversion and optimisation for - images served through Cloudflare's network. Refer to the - [Image Resizing documentation](https://developers.cloudflare.com/images/) for - more information. - - 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}/settings/image_resizing", - body=maybe_transform({"value": value}, image_resizing_edit_params.ImageResizingEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ImageResizing]]._unwrapper, - ), - cast_to=cast(Type[Optional[ImageResizing]], ResultWrapper[ImageResizing]), - ) - - def get( - self, - *, - zone_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[ImageResizing]: - """ - Image Resizing provides on-demand resizing, conversion and optimisation for - images served through Cloudflare's network. Refer to the - [Image Resizing documentation](https://developers.cloudflare.com/images/) for - more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/image_resizing", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ImageResizing]]._unwrapper, - ), - cast_to=cast(Type[Optional[ImageResizing]], ResultWrapper[ImageResizing]), - ) - - -class AsyncImageResizingResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncImageResizingResourceWithRawResponse: - return AsyncImageResizingResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncImageResizingResourceWithStreamingResponse: - return AsyncImageResizingResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: ImageResizingParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ImageResizing]: - """ - Image Resizing provides on-demand resizing, conversion and optimisation for - images served through Cloudflare's network. Refer to the - [Image Resizing documentation](https://developers.cloudflare.com/images/) for - more information. - - Args: - zone_id: Identifier - - value: Image Resizing provides on-demand resizing, conversion and optimisation for - images served through Cloudflare's network. Refer to the - [Image Resizing documentation](https://developers.cloudflare.com/images/) for - more information. - - 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}/settings/image_resizing", - body=await async_maybe_transform({"value": value}, image_resizing_edit_params.ImageResizingEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ImageResizing]]._unwrapper, - ), - cast_to=cast(Type[Optional[ImageResizing]], ResultWrapper[ImageResizing]), - ) - - async def get( - self, - *, - zone_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[ImageResizing]: - """ - Image Resizing provides on-demand resizing, conversion and optimisation for - images served through Cloudflare's network. Refer to the - [Image Resizing documentation](https://developers.cloudflare.com/images/) for - more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/image_resizing", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ImageResizing]]._unwrapper, - ), - cast_to=cast(Type[Optional[ImageResizing]], ResultWrapper[ImageResizing]), - ) - - -class ImageResizingResourceWithRawResponse: - def __init__(self, image_resizing: ImageResizingResource) -> None: - self._image_resizing = image_resizing - - self.edit = to_raw_response_wrapper( - image_resizing.edit, - ) - self.get = to_raw_response_wrapper( - image_resizing.get, - ) - - -class AsyncImageResizingResourceWithRawResponse: - def __init__(self, image_resizing: AsyncImageResizingResource) -> None: - self._image_resizing = image_resizing - - self.edit = async_to_raw_response_wrapper( - image_resizing.edit, - ) - self.get = async_to_raw_response_wrapper( - image_resizing.get, - ) - - -class ImageResizingResourceWithStreamingResponse: - def __init__(self, image_resizing: ImageResizingResource) -> None: - self._image_resizing = image_resizing - - self.edit = to_streamed_response_wrapper( - image_resizing.edit, - ) - self.get = to_streamed_response_wrapper( - image_resizing.get, - ) - - -class AsyncImageResizingResourceWithStreamingResponse: - def __init__(self, image_resizing: AsyncImageResizingResource) -> None: - self._image_resizing = image_resizing - - self.edit = async_to_streamed_response_wrapper( - image_resizing.edit, - ) - self.get = async_to_streamed_response_wrapper( - image_resizing.get, - ) diff --git a/src/cloudflare/resources/zones/settings/ip_geolocation.py b/src/cloudflare/resources/zones/settings/ip_geolocation.py deleted file mode 100644 index e46ca0373be..00000000000 --- a/src/cloudflare/resources/zones/settings/ip_geolocation.py +++ /dev/null @@ -1,270 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import ip_geolocation_edit_params -from ....types.zones.settings.ip_geolocation import IPGeolocation - -__all__ = ["IPGeolocationResource", "AsyncIPGeolocationResource"] - - -class IPGeolocationResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> IPGeolocationResourceWithRawResponse: - return IPGeolocationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> IPGeolocationResourceWithStreamingResponse: - return IPGeolocationResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IPGeolocation]: - """ - Enable IP Geolocation to have Cloudflare geolocate visitors to your website and - pass the country code to you. - (https://support.cloudflare.com/hc/en-us/articles/200168236). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/ip_geolocation", - body=maybe_transform({"value": value}, ip_geolocation_edit_params.IPGeolocationEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPGeolocation]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPGeolocation]], ResultWrapper[IPGeolocation]), - ) - - def get( - self, - *, - zone_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[IPGeolocation]: - """ - Enable IP Geolocation to have Cloudflare geolocate visitors to your website and - pass the country code to you. - (https://support.cloudflare.com/hc/en-us/articles/200168236). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/ip_geolocation", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPGeolocation]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPGeolocation]], ResultWrapper[IPGeolocation]), - ) - - -class AsyncIPGeolocationResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncIPGeolocationResourceWithRawResponse: - return AsyncIPGeolocationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncIPGeolocationResourceWithStreamingResponse: - return AsyncIPGeolocationResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IPGeolocation]: - """ - Enable IP Geolocation to have Cloudflare geolocate visitors to your website and - pass the country code to you. - (https://support.cloudflare.com/hc/en-us/articles/200168236). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/ip_geolocation", - body=await async_maybe_transform({"value": value}, ip_geolocation_edit_params.IPGeolocationEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPGeolocation]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPGeolocation]], ResultWrapper[IPGeolocation]), - ) - - async def get( - self, - *, - zone_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[IPGeolocation]: - """ - Enable IP Geolocation to have Cloudflare geolocate visitors to your website and - pass the country code to you. - (https://support.cloudflare.com/hc/en-us/articles/200168236). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/ip_geolocation", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPGeolocation]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPGeolocation]], ResultWrapper[IPGeolocation]), - ) - - -class IPGeolocationResourceWithRawResponse: - def __init__(self, ip_geolocation: IPGeolocationResource) -> None: - self._ip_geolocation = ip_geolocation - - self.edit = to_raw_response_wrapper( - ip_geolocation.edit, - ) - self.get = to_raw_response_wrapper( - ip_geolocation.get, - ) - - -class AsyncIPGeolocationResourceWithRawResponse: - def __init__(self, ip_geolocation: AsyncIPGeolocationResource) -> None: - self._ip_geolocation = ip_geolocation - - self.edit = async_to_raw_response_wrapper( - ip_geolocation.edit, - ) - self.get = async_to_raw_response_wrapper( - ip_geolocation.get, - ) - - -class IPGeolocationResourceWithStreamingResponse: - def __init__(self, ip_geolocation: IPGeolocationResource) -> None: - self._ip_geolocation = ip_geolocation - - self.edit = to_streamed_response_wrapper( - ip_geolocation.edit, - ) - self.get = to_streamed_response_wrapper( - ip_geolocation.get, - ) - - -class AsyncIPGeolocationResourceWithStreamingResponse: - def __init__(self, ip_geolocation: AsyncIPGeolocationResource) -> None: - self._ip_geolocation = ip_geolocation - - self.edit = async_to_streamed_response_wrapper( - ip_geolocation.edit, - ) - self.get = async_to_streamed_response_wrapper( - ip_geolocation.get, - ) diff --git a/src/cloudflare/resources/zones/settings/ipv6.py b/src/cloudflare/resources/zones/settings/ipv6.py deleted file mode 100644 index 5427997cfb8..00000000000 --- a/src/cloudflare/resources/zones/settings/ipv6.py +++ /dev/null @@ -1,266 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import ipv6_edit_params -from ....types.zones.settings.ipv6 import IPV6 - -__all__ = ["IPV6Resource", "AsyncIPV6Resource"] - - -class IPV6Resource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> IPV6ResourceWithRawResponse: - return IPV6ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> IPV6ResourceWithStreamingResponse: - return IPV6ResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IPV6]: - """ - Enable IPv6 on all subdomains that are Cloudflare enabled. - (https://support.cloudflare.com/hc/en-us/articles/200168586). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/ipv6", - body=maybe_transform({"value": value}, ipv6_edit_params.IPV6EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPV6]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPV6]], ResultWrapper[IPV6]), - ) - - def get( - self, - *, - zone_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[IPV6]: - """ - Enable IPv6 on all subdomains that are Cloudflare enabled. - (https://support.cloudflare.com/hc/en-us/articles/200168586). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/ipv6", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPV6]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPV6]], ResultWrapper[IPV6]), - ) - - -class AsyncIPV6Resource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncIPV6ResourceWithRawResponse: - return AsyncIPV6ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncIPV6ResourceWithStreamingResponse: - return AsyncIPV6ResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[IPV6]: - """ - Enable IPv6 on all subdomains that are Cloudflare enabled. - (https://support.cloudflare.com/hc/en-us/articles/200168586). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/ipv6", - body=await async_maybe_transform({"value": value}, ipv6_edit_params.IPV6EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPV6]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPV6]], ResultWrapper[IPV6]), - ) - - async def get( - self, - *, - zone_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[IPV6]: - """ - Enable IPv6 on all subdomains that are Cloudflare enabled. - (https://support.cloudflare.com/hc/en-us/articles/200168586). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/ipv6", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[IPV6]]._unwrapper, - ), - cast_to=cast(Type[Optional[IPV6]], ResultWrapper[IPV6]), - ) - - -class IPV6ResourceWithRawResponse: - def __init__(self, ipv6: IPV6Resource) -> None: - self._ipv6 = ipv6 - - self.edit = to_raw_response_wrapper( - ipv6.edit, - ) - self.get = to_raw_response_wrapper( - ipv6.get, - ) - - -class AsyncIPV6ResourceWithRawResponse: - def __init__(self, ipv6: AsyncIPV6Resource) -> None: - self._ipv6 = ipv6 - - self.edit = async_to_raw_response_wrapper( - ipv6.edit, - ) - self.get = async_to_raw_response_wrapper( - ipv6.get, - ) - - -class IPV6ResourceWithStreamingResponse: - def __init__(self, ipv6: IPV6Resource) -> None: - self._ipv6 = ipv6 - - self.edit = to_streamed_response_wrapper( - ipv6.edit, - ) - self.get = to_streamed_response_wrapper( - ipv6.get, - ) - - -class AsyncIPV6ResourceWithStreamingResponse: - def __init__(self, ipv6: AsyncIPV6Resource) -> None: - self._ipv6 = ipv6 - - self.edit = async_to_streamed_response_wrapper( - ipv6.edit, - ) - self.get = async_to_streamed_response_wrapper( - ipv6.get, - ) diff --git a/src/cloudflare/resources/zones/settings/min_tls_version.py b/src/cloudflare/resources/zones/settings/min_tls_version.py deleted file mode 100644 index e497eb57709..00000000000 --- a/src/cloudflare/resources/zones/settings/min_tls_version.py +++ /dev/null @@ -1,262 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import min_tls_version_edit_params -from ....types.zones.settings.min_tls_version import MinTLSVersion - -__all__ = ["MinTLSVersionResource", "AsyncMinTLSVersionResource"] - - -class MinTLSVersionResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> MinTLSVersionResourceWithRawResponse: - return MinTLSVersionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> MinTLSVersionResourceWithStreamingResponse: - return MinTLSVersionResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["1.0", "1.1", "1.2", "1.3"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[MinTLSVersion]: - """ - Changes Minimum TLS Version setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/min_tls_version", - body=maybe_transform({"value": value}, min_tls_version_edit_params.MinTLSVersionEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MinTLSVersion]]._unwrapper, - ), - cast_to=cast(Type[Optional[MinTLSVersion]], ResultWrapper[MinTLSVersion]), - ) - - def get( - self, - *, - zone_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[MinTLSVersion]: - """ - Gets Minimum TLS Version setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/min_tls_version", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MinTLSVersion]]._unwrapper, - ), - cast_to=cast(Type[Optional[MinTLSVersion]], ResultWrapper[MinTLSVersion]), - ) - - -class AsyncMinTLSVersionResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncMinTLSVersionResourceWithRawResponse: - return AsyncMinTLSVersionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncMinTLSVersionResourceWithStreamingResponse: - return AsyncMinTLSVersionResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["1.0", "1.1", "1.2", "1.3"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[MinTLSVersion]: - """ - Changes Minimum TLS Version setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/min_tls_version", - body=await async_maybe_transform({"value": value}, min_tls_version_edit_params.MinTLSVersionEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MinTLSVersion]]._unwrapper, - ), - cast_to=cast(Type[Optional[MinTLSVersion]], ResultWrapper[MinTLSVersion]), - ) - - async def get( - self, - *, - zone_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[MinTLSVersion]: - """ - Gets Minimum TLS Version setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/min_tls_version", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MinTLSVersion]]._unwrapper, - ), - cast_to=cast(Type[Optional[MinTLSVersion]], ResultWrapper[MinTLSVersion]), - ) - - -class MinTLSVersionResourceWithRawResponse: - def __init__(self, min_tls_version: MinTLSVersionResource) -> None: - self._min_tls_version = min_tls_version - - self.edit = to_raw_response_wrapper( - min_tls_version.edit, - ) - self.get = to_raw_response_wrapper( - min_tls_version.get, - ) - - -class AsyncMinTLSVersionResourceWithRawResponse: - def __init__(self, min_tls_version: AsyncMinTLSVersionResource) -> None: - self._min_tls_version = min_tls_version - - self.edit = async_to_raw_response_wrapper( - min_tls_version.edit, - ) - self.get = async_to_raw_response_wrapper( - min_tls_version.get, - ) - - -class MinTLSVersionResourceWithStreamingResponse: - def __init__(self, min_tls_version: MinTLSVersionResource) -> None: - self._min_tls_version = min_tls_version - - self.edit = to_streamed_response_wrapper( - min_tls_version.edit, - ) - self.get = to_streamed_response_wrapper( - min_tls_version.get, - ) - - -class AsyncMinTLSVersionResourceWithStreamingResponse: - def __init__(self, min_tls_version: AsyncMinTLSVersionResource) -> None: - self._min_tls_version = min_tls_version - - self.edit = async_to_streamed_response_wrapper( - min_tls_version.edit, - ) - self.get = async_to_streamed_response_wrapper( - min_tls_version.get, - ) diff --git a/src/cloudflare/resources/zones/settings/minify.py b/src/cloudflare/resources/zones/settings/minify.py deleted file mode 100644 index 695214c16ce..00000000000 --- a/src/cloudflare/resources/zones/settings/minify.py +++ /dev/null @@ -1,273 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import minify_edit_params -from ....types.zones.settings.minify import Minify - -__all__ = ["MinifyResource", "AsyncMinifyResource"] - - -class MinifyResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> MinifyResourceWithRawResponse: - return MinifyResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> MinifyResourceWithStreamingResponse: - return MinifyResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: minify_edit_params.Value, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Minify]: - """Automatically minify certain assets for your website. - - Refer to - [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) - for more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/minify", - body=maybe_transform({"value": value}, minify_edit_params.MinifyEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Minify]]._unwrapper, - ), - cast_to=cast(Type[Optional[Minify]], ResultWrapper[Minify]), - ) - - def get( - self, - *, - zone_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[Minify]: - """Automatically minify certain assets for your website. - - Refer to - [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/minify", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Minify]]._unwrapper, - ), - cast_to=cast(Type[Optional[Minify]], ResultWrapper[Minify]), - ) - - -class AsyncMinifyResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncMinifyResourceWithRawResponse: - return AsyncMinifyResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncMinifyResourceWithStreamingResponse: - return AsyncMinifyResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: minify_edit_params.Value, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Minify]: - """Automatically minify certain assets for your website. - - Refer to - [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) - for more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/minify", - body=await async_maybe_transform({"value": value}, minify_edit_params.MinifyEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Minify]]._unwrapper, - ), - cast_to=cast(Type[Optional[Minify]], ResultWrapper[Minify]), - ) - - async def get( - self, - *, - zone_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[Minify]: - """Automatically minify certain assets for your website. - - Refer to - [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/minify", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Minify]]._unwrapper, - ), - cast_to=cast(Type[Optional[Minify]], ResultWrapper[Minify]), - ) - - -class MinifyResourceWithRawResponse: - def __init__(self, minify: MinifyResource) -> None: - self._minify = minify - - self.edit = to_raw_response_wrapper( - minify.edit, - ) - self.get = to_raw_response_wrapper( - minify.get, - ) - - -class AsyncMinifyResourceWithRawResponse: - def __init__(self, minify: AsyncMinifyResource) -> None: - self._minify = minify - - self.edit = async_to_raw_response_wrapper( - minify.edit, - ) - self.get = async_to_raw_response_wrapper( - minify.get, - ) - - -class MinifyResourceWithStreamingResponse: - def __init__(self, minify: MinifyResource) -> None: - self._minify = minify - - self.edit = to_streamed_response_wrapper( - minify.edit, - ) - self.get = to_streamed_response_wrapper( - minify.get, - ) - - -class AsyncMinifyResourceWithStreamingResponse: - def __init__(self, minify: AsyncMinifyResource) -> None: - self._minify = minify - - self.edit = async_to_streamed_response_wrapper( - minify.edit, - ) - self.get = async_to_streamed_response_wrapper( - minify.get, - ) diff --git a/src/cloudflare/resources/zones/settings/mirage.py b/src/cloudflare/resources/zones/settings/mirage.py deleted file mode 100644 index 3116f40060c..00000000000 --- a/src/cloudflare/resources/zones/settings/mirage.py +++ /dev/null @@ -1,274 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import mirage_edit_params -from ....types.zones.settings.mirage import Mirage - -__all__ = ["MirageResource", "AsyncMirageResource"] - - -class MirageResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> MirageResourceWithRawResponse: - return MirageResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> MirageResourceWithStreamingResponse: - return MirageResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Mirage]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our - [blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for more - information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/mirage", - body=maybe_transform({"value": value}, mirage_edit_params.MirageEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Mirage]]._unwrapper, - ), - cast_to=cast(Type[Optional[Mirage]], ResultWrapper[Mirage]), - ) - - def get( - self, - *, - zone_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[Mirage]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our - [blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for more - information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/mirage", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Mirage]]._unwrapper, - ), - cast_to=cast(Type[Optional[Mirage]], ResultWrapper[Mirage]), - ) - - -class AsyncMirageResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncMirageResourceWithRawResponse: - return AsyncMirageResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncMirageResourceWithStreamingResponse: - return AsyncMirageResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Mirage]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our - [blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for more - information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/mirage", - body=await async_maybe_transform({"value": value}, mirage_edit_params.MirageEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Mirage]]._unwrapper, - ), - cast_to=cast(Type[Optional[Mirage]], ResultWrapper[Mirage]), - ) - - async def get( - self, - *, - zone_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[Mirage]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our - [blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for more - information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/mirage", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Mirage]]._unwrapper, - ), - cast_to=cast(Type[Optional[Mirage]], ResultWrapper[Mirage]), - ) - - -class MirageResourceWithRawResponse: - def __init__(self, mirage: MirageResource) -> None: - self._mirage = mirage - - self.edit = to_raw_response_wrapper( - mirage.edit, - ) - self.get = to_raw_response_wrapper( - mirage.get, - ) - - -class AsyncMirageResourceWithRawResponse: - def __init__(self, mirage: AsyncMirageResource) -> None: - self._mirage = mirage - - self.edit = async_to_raw_response_wrapper( - mirage.edit, - ) - self.get = async_to_raw_response_wrapper( - mirage.get, - ) - - -class MirageResourceWithStreamingResponse: - def __init__(self, mirage: MirageResource) -> None: - self._mirage = mirage - - self.edit = to_streamed_response_wrapper( - mirage.edit, - ) - self.get = to_streamed_response_wrapper( - mirage.get, - ) - - -class AsyncMirageResourceWithStreamingResponse: - def __init__(self, mirage: AsyncMirageResource) -> None: - self._mirage = mirage - - self.edit = async_to_streamed_response_wrapper( - mirage.edit, - ) - self.get = async_to_streamed_response_wrapper( - mirage.get, - ) diff --git a/src/cloudflare/resources/zones/settings/mobile_redirect.py b/src/cloudflare/resources/zones/settings/mobile_redirect.py deleted file mode 100644 index 8774da3fb24..00000000000 --- a/src/cloudflare/resources/zones/settings/mobile_redirect.py +++ /dev/null @@ -1,273 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import mobile_redirect_edit_params -from ....types.zones.settings.mobile_redirect import MobileRedirect - -__all__ = ["MobileRedirectResource", "AsyncMobileRedirectResource"] - - -class MobileRedirectResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> MobileRedirectResourceWithRawResponse: - return MobileRedirectResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> MobileRedirectResourceWithStreamingResponse: - return MobileRedirectResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: mobile_redirect_edit_params.Value, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[MobileRedirect]: - """ - Automatically redirect visitors on mobile devices to a mobile-optimized - subdomain. Refer to - [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) - for more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/mobile_redirect", - body=maybe_transform({"value": value}, mobile_redirect_edit_params.MobileRedirectEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MobileRedirect]]._unwrapper, - ), - cast_to=cast(Type[Optional[MobileRedirect]], ResultWrapper[MobileRedirect]), - ) - - def get( - self, - *, - zone_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[MobileRedirect]: - """ - Automatically redirect visitors on mobile devices to a mobile-optimized - subdomain. Refer to - [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/mobile_redirect", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MobileRedirect]]._unwrapper, - ), - cast_to=cast(Type[Optional[MobileRedirect]], ResultWrapper[MobileRedirect]), - ) - - -class AsyncMobileRedirectResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncMobileRedirectResourceWithRawResponse: - return AsyncMobileRedirectResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncMobileRedirectResourceWithStreamingResponse: - return AsyncMobileRedirectResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: mobile_redirect_edit_params.Value, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[MobileRedirect]: - """ - Automatically redirect visitors on mobile devices to a mobile-optimized - subdomain. Refer to - [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) - for more information. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/mobile_redirect", - body=await async_maybe_transform({"value": value}, mobile_redirect_edit_params.MobileRedirectEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MobileRedirect]]._unwrapper, - ), - cast_to=cast(Type[Optional[MobileRedirect]], ResultWrapper[MobileRedirect]), - ) - - async def get( - self, - *, - zone_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[MobileRedirect]: - """ - Automatically redirect visitors on mobile devices to a mobile-optimized - subdomain. Refer to - [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/mobile_redirect", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[MobileRedirect]]._unwrapper, - ), - cast_to=cast(Type[Optional[MobileRedirect]], ResultWrapper[MobileRedirect]), - ) - - -class MobileRedirectResourceWithRawResponse: - def __init__(self, mobile_redirect: MobileRedirectResource) -> None: - self._mobile_redirect = mobile_redirect - - self.edit = to_raw_response_wrapper( - mobile_redirect.edit, - ) - self.get = to_raw_response_wrapper( - mobile_redirect.get, - ) - - -class AsyncMobileRedirectResourceWithRawResponse: - def __init__(self, mobile_redirect: AsyncMobileRedirectResource) -> None: - self._mobile_redirect = mobile_redirect - - self.edit = async_to_raw_response_wrapper( - mobile_redirect.edit, - ) - self.get = async_to_raw_response_wrapper( - mobile_redirect.get, - ) - - -class MobileRedirectResourceWithStreamingResponse: - def __init__(self, mobile_redirect: MobileRedirectResource) -> None: - self._mobile_redirect = mobile_redirect - - self.edit = to_streamed_response_wrapper( - mobile_redirect.edit, - ) - self.get = to_streamed_response_wrapper( - mobile_redirect.get, - ) - - -class AsyncMobileRedirectResourceWithStreamingResponse: - def __init__(self, mobile_redirect: AsyncMobileRedirectResource) -> None: - self._mobile_redirect = mobile_redirect - - self.edit = async_to_streamed_response_wrapper( - mobile_redirect.edit, - ) - self.get = async_to_streamed_response_wrapper( - mobile_redirect.get, - ) diff --git a/src/cloudflare/resources/zones/settings/nel.py b/src/cloudflare/resources/zones/settings/nel.py deleted file mode 100644 index 325792ab4f1..00000000000 --- a/src/cloudflare/resources/zones/settings/nel.py +++ /dev/null @@ -1,268 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import NEL, nel_edit_params -from ....types.zones.settings.nel import NEL -from ....types.zones.settings.nel_param import NELParam - -__all__ = ["NELResource", "AsyncNELResource"] - - -class NELResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> NELResourceWithRawResponse: - return NELResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> NELResourceWithStreamingResponse: - return NELResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: NELParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[NEL]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our [blog post](http://blog.cloudflare.com/nel-solving-mobile-speed) - for more information. - - Args: - zone_id: Identifier - - value: Enable Network Error Logging reporting on your zone. (Beta) - - 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}/settings/nel", - body=maybe_transform({"value": value}, nel_edit_params.NELEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[NEL]]._unwrapper, - ), - cast_to=cast(Type[Optional[NEL]], ResultWrapper[NEL]), - ) - - def get( - self, - *, - zone_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[NEL]: - """Enable Network Error Logging reporting on your zone. - - (Beta) - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/nel", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[NEL]]._unwrapper, - ), - cast_to=cast(Type[Optional[NEL]], ResultWrapper[NEL]), - ) - - -class AsyncNELResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncNELResourceWithRawResponse: - return AsyncNELResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncNELResourceWithStreamingResponse: - return AsyncNELResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: NELParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[NEL]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our [blog post](http://blog.cloudflare.com/nel-solving-mobile-speed) - for more information. - - Args: - zone_id: Identifier - - value: Enable Network Error Logging reporting on your zone. (Beta) - - 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}/settings/nel", - body=await async_maybe_transform({"value": value}, nel_edit_params.NELEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[NEL]]._unwrapper, - ), - cast_to=cast(Type[Optional[NEL]], ResultWrapper[NEL]), - ) - - async def get( - self, - *, - zone_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[NEL]: - """Enable Network Error Logging reporting on your zone. - - (Beta) - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/nel", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[NEL]]._unwrapper, - ), - cast_to=cast(Type[Optional[NEL]], ResultWrapper[NEL]), - ) - - -class NELResourceWithRawResponse: - def __init__(self, nel: NELResource) -> None: - self._nel = nel - - self.edit = to_raw_response_wrapper( - nel.edit, - ) - self.get = to_raw_response_wrapper( - nel.get, - ) - - -class AsyncNELResourceWithRawResponse: - def __init__(self, nel: AsyncNELResource) -> None: - self._nel = nel - - self.edit = async_to_raw_response_wrapper( - nel.edit, - ) - self.get = async_to_raw_response_wrapper( - nel.get, - ) - - -class NELResourceWithStreamingResponse: - def __init__(self, nel: NELResource) -> None: - self._nel = nel - - self.edit = to_streamed_response_wrapper( - nel.edit, - ) - self.get = to_streamed_response_wrapper( - nel.get, - ) - - -class AsyncNELResourceWithStreamingResponse: - def __init__(self, nel: AsyncNELResource) -> None: - self._nel = nel - - self.edit = async_to_streamed_response_wrapper( - nel.edit, - ) - self.get = async_to_streamed_response_wrapper( - nel.get, - ) diff --git a/src/cloudflare/resources/zones/settings/opportunistic_encryption.py b/src/cloudflare/resources/zones/settings/opportunistic_encryption.py deleted file mode 100644 index dc2d9cb1ff1..00000000000 --- a/src/cloudflare/resources/zones/settings/opportunistic_encryption.py +++ /dev/null @@ -1,268 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import opportunistic_encryption_edit_params -from ....types.zones.settings.opportunistic_encryption import OpportunisticEncryption - -__all__ = ["OpportunisticEncryptionResource", "AsyncOpportunisticEncryptionResource"] - - -class OpportunisticEncryptionResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> OpportunisticEncryptionResourceWithRawResponse: - return OpportunisticEncryptionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> OpportunisticEncryptionResourceWithStreamingResponse: - return OpportunisticEncryptionResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OpportunisticEncryption]: - """ - Changes Opportunistic Encryption setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/opportunistic_encryption", - body=maybe_transform( - {"value": value}, opportunistic_encryption_edit_params.OpportunisticEncryptionEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticEncryption]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticEncryption]], ResultWrapper[OpportunisticEncryption]), - ) - - def get( - self, - *, - zone_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[OpportunisticEncryption]: - """ - Gets Opportunistic Encryption setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/opportunistic_encryption", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticEncryption]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticEncryption]], ResultWrapper[OpportunisticEncryption]), - ) - - -class AsyncOpportunisticEncryptionResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncOpportunisticEncryptionResourceWithRawResponse: - return AsyncOpportunisticEncryptionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncOpportunisticEncryptionResourceWithStreamingResponse: - return AsyncOpportunisticEncryptionResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OpportunisticEncryption]: - """ - Changes Opportunistic Encryption setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/opportunistic_encryption", - body=await async_maybe_transform( - {"value": value}, opportunistic_encryption_edit_params.OpportunisticEncryptionEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticEncryption]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticEncryption]], ResultWrapper[OpportunisticEncryption]), - ) - - async def get( - self, - *, - zone_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[OpportunisticEncryption]: - """ - Gets Opportunistic Encryption setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/opportunistic_encryption", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticEncryption]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticEncryption]], ResultWrapper[OpportunisticEncryption]), - ) - - -class OpportunisticEncryptionResourceWithRawResponse: - def __init__(self, opportunistic_encryption: OpportunisticEncryptionResource) -> None: - self._opportunistic_encryption = opportunistic_encryption - - self.edit = to_raw_response_wrapper( - opportunistic_encryption.edit, - ) - self.get = to_raw_response_wrapper( - opportunistic_encryption.get, - ) - - -class AsyncOpportunisticEncryptionResourceWithRawResponse: - def __init__(self, opportunistic_encryption: AsyncOpportunisticEncryptionResource) -> None: - self._opportunistic_encryption = opportunistic_encryption - - self.edit = async_to_raw_response_wrapper( - opportunistic_encryption.edit, - ) - self.get = async_to_raw_response_wrapper( - opportunistic_encryption.get, - ) - - -class OpportunisticEncryptionResourceWithStreamingResponse: - def __init__(self, opportunistic_encryption: OpportunisticEncryptionResource) -> None: - self._opportunistic_encryption = opportunistic_encryption - - self.edit = to_streamed_response_wrapper( - opportunistic_encryption.edit, - ) - self.get = to_streamed_response_wrapper( - opportunistic_encryption.get, - ) - - -class AsyncOpportunisticEncryptionResourceWithStreamingResponse: - def __init__(self, opportunistic_encryption: AsyncOpportunisticEncryptionResource) -> None: - self._opportunistic_encryption = opportunistic_encryption - - self.edit = async_to_streamed_response_wrapper( - opportunistic_encryption.edit, - ) - self.get = async_to_streamed_response_wrapper( - opportunistic_encryption.get, - ) diff --git a/src/cloudflare/resources/zones/settings/opportunistic_onion.py b/src/cloudflare/resources/zones/settings/opportunistic_onion.py deleted file mode 100644 index 50f3e225e33..00000000000 --- a/src/cloudflare/resources/zones/settings/opportunistic_onion.py +++ /dev/null @@ -1,270 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import opportunistic_onion_edit_params -from ....types.zones.settings.opportunistic_onion import OpportunisticOnion - -__all__ = ["OpportunisticOnionResource", "AsyncOpportunisticOnionResource"] - - -class OpportunisticOnionResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> OpportunisticOnionResourceWithRawResponse: - return OpportunisticOnionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> OpportunisticOnionResourceWithStreamingResponse: - return OpportunisticOnionResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OpportunisticOnion]: - """ - Add an Alt-Svc header to all legitimate requests from Tor, allowing the - connection to use our onion services instead of exit nodes. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/opportunistic_onion", - body=maybe_transform({"value": value}, opportunistic_onion_edit_params.OpportunisticOnionEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticOnion]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticOnion]], ResultWrapper[OpportunisticOnion]), - ) - - def get( - self, - *, - zone_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[OpportunisticOnion]: - """ - Add an Alt-Svc header to all legitimate requests from Tor, allowing the - connection to use our onion services instead of exit nodes. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/opportunistic_onion", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticOnion]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticOnion]], ResultWrapper[OpportunisticOnion]), - ) - - -class AsyncOpportunisticOnionResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncOpportunisticOnionResourceWithRawResponse: - return AsyncOpportunisticOnionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncOpportunisticOnionResourceWithStreamingResponse: - return AsyncOpportunisticOnionResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OpportunisticOnion]: - """ - Add an Alt-Svc header to all legitimate requests from Tor, allowing the - connection to use our onion services instead of exit nodes. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/opportunistic_onion", - body=await async_maybe_transform( - {"value": value}, opportunistic_onion_edit_params.OpportunisticOnionEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticOnion]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticOnion]], ResultWrapper[OpportunisticOnion]), - ) - - async def get( - self, - *, - zone_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[OpportunisticOnion]: - """ - Add an Alt-Svc header to all legitimate requests from Tor, allowing the - connection to use our onion services instead of exit nodes. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/opportunistic_onion", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OpportunisticOnion]]._unwrapper, - ), - cast_to=cast(Type[Optional[OpportunisticOnion]], ResultWrapper[OpportunisticOnion]), - ) - - -class OpportunisticOnionResourceWithRawResponse: - def __init__(self, opportunistic_onion: OpportunisticOnionResource) -> None: - self._opportunistic_onion = opportunistic_onion - - self.edit = to_raw_response_wrapper( - opportunistic_onion.edit, - ) - self.get = to_raw_response_wrapper( - opportunistic_onion.get, - ) - - -class AsyncOpportunisticOnionResourceWithRawResponse: - def __init__(self, opportunistic_onion: AsyncOpportunisticOnionResource) -> None: - self._opportunistic_onion = opportunistic_onion - - self.edit = async_to_raw_response_wrapper( - opportunistic_onion.edit, - ) - self.get = async_to_raw_response_wrapper( - opportunistic_onion.get, - ) - - -class OpportunisticOnionResourceWithStreamingResponse: - def __init__(self, opportunistic_onion: OpportunisticOnionResource) -> None: - self._opportunistic_onion = opportunistic_onion - - self.edit = to_streamed_response_wrapper( - opportunistic_onion.edit, - ) - self.get = to_streamed_response_wrapper( - opportunistic_onion.get, - ) - - -class AsyncOpportunisticOnionResourceWithStreamingResponse: - def __init__(self, opportunistic_onion: AsyncOpportunisticOnionResource) -> None: - self._opportunistic_onion = opportunistic_onion - - self.edit = async_to_streamed_response_wrapper( - opportunistic_onion.edit, - ) - self.get = async_to_streamed_response_wrapper( - opportunistic_onion.get, - ) diff --git a/src/cloudflare/resources/zones/settings/orange_to_orange.py b/src/cloudflare/resources/zones/settings/orange_to_orange.py deleted file mode 100644 index c302303ee37..00000000000 --- a/src/cloudflare/resources/zones/settings/orange_to_orange.py +++ /dev/null @@ -1,268 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import OrangeToOrange, orange_to_orange_edit_params -from ....types.zones.settings.orange_to_orange import OrangeToOrange -from ....types.zones.settings.orange_to_orange_param import OrangeToOrangeParam - -__all__ = ["OrangeToOrangeResource", "AsyncOrangeToOrangeResource"] - - -class OrangeToOrangeResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> OrangeToOrangeResourceWithRawResponse: - return OrangeToOrangeResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> OrangeToOrangeResourceWithStreamingResponse: - return OrangeToOrangeResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: OrangeToOrangeParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OrangeToOrange]: - """ - Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - on Cloudflare. - - Args: - zone_id: Identifier - - value: Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - on Cloudflare. - - 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}/settings/orange_to_orange", - body=maybe_transform({"value": value}, orange_to_orange_edit_params.OrangeToOrangeEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OrangeToOrange]]._unwrapper, - ), - cast_to=cast(Type[Optional[OrangeToOrange]], ResultWrapper[OrangeToOrange]), - ) - - def get( - self, - *, - zone_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[OrangeToOrange]: - """ - Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - on Cloudflare. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/orange_to_orange", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OrangeToOrange]]._unwrapper, - ), - cast_to=cast(Type[Optional[OrangeToOrange]], ResultWrapper[OrangeToOrange]), - ) - - -class AsyncOrangeToOrangeResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncOrangeToOrangeResourceWithRawResponse: - return AsyncOrangeToOrangeResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncOrangeToOrangeResourceWithStreamingResponse: - return AsyncOrangeToOrangeResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: OrangeToOrangeParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OrangeToOrange]: - """ - Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - on Cloudflare. - - Args: - zone_id: Identifier - - value: Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - on Cloudflare. - - 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}/settings/orange_to_orange", - body=await async_maybe_transform({"value": value}, orange_to_orange_edit_params.OrangeToOrangeEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OrangeToOrange]]._unwrapper, - ), - cast_to=cast(Type[Optional[OrangeToOrange]], ResultWrapper[OrangeToOrange]), - ) - - async def get( - self, - *, - zone_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[OrangeToOrange]: - """ - Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - on Cloudflare. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/orange_to_orange", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OrangeToOrange]]._unwrapper, - ), - cast_to=cast(Type[Optional[OrangeToOrange]], ResultWrapper[OrangeToOrange]), - ) - - -class OrangeToOrangeResourceWithRawResponse: - def __init__(self, orange_to_orange: OrangeToOrangeResource) -> None: - self._orange_to_orange = orange_to_orange - - self.edit = to_raw_response_wrapper( - orange_to_orange.edit, - ) - self.get = to_raw_response_wrapper( - orange_to_orange.get, - ) - - -class AsyncOrangeToOrangeResourceWithRawResponse: - def __init__(self, orange_to_orange: AsyncOrangeToOrangeResource) -> None: - self._orange_to_orange = orange_to_orange - - self.edit = async_to_raw_response_wrapper( - orange_to_orange.edit, - ) - self.get = async_to_raw_response_wrapper( - orange_to_orange.get, - ) - - -class OrangeToOrangeResourceWithStreamingResponse: - def __init__(self, orange_to_orange: OrangeToOrangeResource) -> None: - self._orange_to_orange = orange_to_orange - - self.edit = to_streamed_response_wrapper( - orange_to_orange.edit, - ) - self.get = to_streamed_response_wrapper( - orange_to_orange.get, - ) - - -class AsyncOrangeToOrangeResourceWithStreamingResponse: - def __init__(self, orange_to_orange: AsyncOrangeToOrangeResource) -> None: - self._orange_to_orange = orange_to_orange - - self.edit = async_to_streamed_response_wrapper( - orange_to_orange.edit, - ) - self.get = async_to_streamed_response_wrapper( - orange_to_orange.get, - ) diff --git a/src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py b/src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py deleted file mode 100644 index 37a1bae6963..00000000000 --- a/src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py +++ /dev/null @@ -1,274 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import origin_error_page_pass_thru_edit_params -from ....types.zones.settings.origin_error_page_pass_thru import OriginErrorPagePassThru - -__all__ = ["OriginErrorPagePassThruResource", "AsyncOriginErrorPagePassThruResource"] - - -class OriginErrorPagePassThruResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> OriginErrorPagePassThruResourceWithRawResponse: - return OriginErrorPagePassThruResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> OriginErrorPagePassThruResourceWithStreamingResponse: - return OriginErrorPagePassThruResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OriginErrorPagePassThru]: - """ - Cloudflare will proxy customer error pages on any 502,504 errors on origin - server instead of showing a default Cloudflare error page. This does not apply - to 522 errors and is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/origin_error_page_pass_thru", - body=maybe_transform( - {"value": value}, origin_error_page_pass_thru_edit_params.OriginErrorPagePassThruEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OriginErrorPagePassThru]]._unwrapper, - ), - cast_to=cast(Type[Optional[OriginErrorPagePassThru]], ResultWrapper[OriginErrorPagePassThru]), - ) - - def get( - self, - *, - zone_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[OriginErrorPagePassThru]: - """ - Cloudflare will proxy customer error pages on any 502,504 errors on origin - server instead of showing a default Cloudflare error page. This does not apply - to 522 errors and is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/origin_error_page_pass_thru", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OriginErrorPagePassThru]]._unwrapper, - ), - cast_to=cast(Type[Optional[OriginErrorPagePassThru]], ResultWrapper[OriginErrorPagePassThru]), - ) - - -class AsyncOriginErrorPagePassThruResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncOriginErrorPagePassThruResourceWithRawResponse: - return AsyncOriginErrorPagePassThruResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncOriginErrorPagePassThruResourceWithStreamingResponse: - return AsyncOriginErrorPagePassThruResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[OriginErrorPagePassThru]: - """ - Cloudflare will proxy customer error pages on any 502,504 errors on origin - server instead of showing a default Cloudflare error page. This does not apply - to 522 errors and is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/origin_error_page_pass_thru", - body=await async_maybe_transform( - {"value": value}, origin_error_page_pass_thru_edit_params.OriginErrorPagePassThruEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OriginErrorPagePassThru]]._unwrapper, - ), - cast_to=cast(Type[Optional[OriginErrorPagePassThru]], ResultWrapper[OriginErrorPagePassThru]), - ) - - async def get( - self, - *, - zone_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[OriginErrorPagePassThru]: - """ - Cloudflare will proxy customer error pages on any 502,504 errors on origin - server instead of showing a default Cloudflare error page. This does not apply - to 522 errors and is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/origin_error_page_pass_thru", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OriginErrorPagePassThru]]._unwrapper, - ), - cast_to=cast(Type[Optional[OriginErrorPagePassThru]], ResultWrapper[OriginErrorPagePassThru]), - ) - - -class OriginErrorPagePassThruResourceWithRawResponse: - def __init__(self, origin_error_page_pass_thru: OriginErrorPagePassThruResource) -> None: - self._origin_error_page_pass_thru = origin_error_page_pass_thru - - self.edit = to_raw_response_wrapper( - origin_error_page_pass_thru.edit, - ) - self.get = to_raw_response_wrapper( - origin_error_page_pass_thru.get, - ) - - -class AsyncOriginErrorPagePassThruResourceWithRawResponse: - def __init__(self, origin_error_page_pass_thru: AsyncOriginErrorPagePassThruResource) -> None: - self._origin_error_page_pass_thru = origin_error_page_pass_thru - - self.edit = async_to_raw_response_wrapper( - origin_error_page_pass_thru.edit, - ) - self.get = async_to_raw_response_wrapper( - origin_error_page_pass_thru.get, - ) - - -class OriginErrorPagePassThruResourceWithStreamingResponse: - def __init__(self, origin_error_page_pass_thru: OriginErrorPagePassThruResource) -> None: - self._origin_error_page_pass_thru = origin_error_page_pass_thru - - self.edit = to_streamed_response_wrapper( - origin_error_page_pass_thru.edit, - ) - self.get = to_streamed_response_wrapper( - origin_error_page_pass_thru.get, - ) - - -class AsyncOriginErrorPagePassThruResourceWithStreamingResponse: - def __init__(self, origin_error_page_pass_thru: AsyncOriginErrorPagePassThruResource) -> None: - self._origin_error_page_pass_thru = origin_error_page_pass_thru - - self.edit = async_to_streamed_response_wrapper( - origin_error_page_pass_thru.edit, - ) - self.get = async_to_streamed_response_wrapper( - origin_error_page_pass_thru.get, - ) diff --git a/src/cloudflare/resources/zones/settings/polish.py b/src/cloudflare/resources/zones/settings/polish.py deleted file mode 100644 index 9479d26bade..00000000000 --- a/src/cloudflare/resources/zones/settings/polish.py +++ /dev/null @@ -1,280 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import Polish, polish_edit_params -from ....types.zones.settings.polish import Polish -from ....types.zones.settings.polish_param import PolishParam - -__all__ = ["PolishResource", "AsyncPolishResource"] - - -class PolishResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> PolishResourceWithRawResponse: - return PolishResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> PolishResourceWithStreamingResponse: - return PolishResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: PolishParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Polish]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) - for more information. - - Args: - zone_id: Identifier - - value: Removes metadata and compresses your images for faster page load times. Basic - (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual - quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster - image loading. Larger JPEGs are converted to progressive images, loading a - lower-resolution image first and ending in a higher-resolution version. Not - recommended for hi-res photography sites. - - 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}/settings/polish", - body=maybe_transform({"value": value}, polish_edit_params.PolishEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Polish]]._unwrapper, - ), - cast_to=cast(Type[Optional[Polish]], ResultWrapper[Polish]), - ) - - def get( - self, - *, - zone_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[Polish]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/polish", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Polish]]._unwrapper, - ), - cast_to=cast(Type[Optional[Polish]], ResultWrapper[Polish]), - ) - - -class AsyncPolishResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncPolishResourceWithRawResponse: - return AsyncPolishResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncPolishResourceWithStreamingResponse: - return AsyncPolishResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: PolishParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Polish]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) - for more information. - - Args: - zone_id: Identifier - - value: Removes metadata and compresses your images for faster page load times. Basic - (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual - quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster - image loading. Larger JPEGs are converted to progressive images, loading a - lower-resolution image first and ending in a higher-resolution version. Not - recommended for hi-res photography sites. - - 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}/settings/polish", - body=await async_maybe_transform({"value": value}, polish_edit_params.PolishEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Polish]]._unwrapper, - ), - cast_to=cast(Type[Optional[Polish]], ResultWrapper[Polish]), - ) - - async def get( - self, - *, - zone_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[Polish]: - """ - Automatically optimize image loading for website visitors on mobile devices. - Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/polish", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Polish]]._unwrapper, - ), - cast_to=cast(Type[Optional[Polish]], ResultWrapper[Polish]), - ) - - -class PolishResourceWithRawResponse: - def __init__(self, polish: PolishResource) -> None: - self._polish = polish - - self.edit = to_raw_response_wrapper( - polish.edit, - ) - self.get = to_raw_response_wrapper( - polish.get, - ) - - -class AsyncPolishResourceWithRawResponse: - def __init__(self, polish: AsyncPolishResource) -> None: - self._polish = polish - - self.edit = async_to_raw_response_wrapper( - polish.edit, - ) - self.get = async_to_raw_response_wrapper( - polish.get, - ) - - -class PolishResourceWithStreamingResponse: - def __init__(self, polish: PolishResource) -> None: - self._polish = polish - - self.edit = to_streamed_response_wrapper( - polish.edit, - ) - self.get = to_streamed_response_wrapper( - polish.get, - ) - - -class AsyncPolishResourceWithStreamingResponse: - def __init__(self, polish: AsyncPolishResource) -> None: - self._polish = polish - - self.edit = async_to_streamed_response_wrapper( - polish.edit, - ) - self.get = async_to_streamed_response_wrapper( - polish.get, - ) diff --git a/src/cloudflare/resources/zones/settings/prefetch_preload.py b/src/cloudflare/resources/zones/settings/prefetch_preload.py deleted file mode 100644 index 39e208ff405..00000000000 --- a/src/cloudflare/resources/zones/settings/prefetch_preload.py +++ /dev/null @@ -1,266 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import prefetch_preload_edit_params -from ....types.zones.settings.prefetch_preload import PrefetchPreload - -__all__ = ["PrefetchPreloadResource", "AsyncPrefetchPreloadResource"] - - -class PrefetchPreloadResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> PrefetchPreloadResourceWithRawResponse: - return PrefetchPreloadResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> PrefetchPreloadResourceWithStreamingResponse: - return PrefetchPreloadResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[PrefetchPreload]: - """ - Cloudflare will prefetch any URLs that are included in the response headers. - This is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/prefetch_preload", - body=maybe_transform({"value": value}, prefetch_preload_edit_params.PrefetchPreloadEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PrefetchPreload]]._unwrapper, - ), - cast_to=cast(Type[Optional[PrefetchPreload]], ResultWrapper[PrefetchPreload]), - ) - - def get( - self, - *, - zone_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[PrefetchPreload]: - """ - Cloudflare will prefetch any URLs that are included in the response headers. - This is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/prefetch_preload", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PrefetchPreload]]._unwrapper, - ), - cast_to=cast(Type[Optional[PrefetchPreload]], ResultWrapper[PrefetchPreload]), - ) - - -class AsyncPrefetchPreloadResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncPrefetchPreloadResourceWithRawResponse: - return AsyncPrefetchPreloadResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncPrefetchPreloadResourceWithStreamingResponse: - return AsyncPrefetchPreloadResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[PrefetchPreload]: - """ - Cloudflare will prefetch any URLs that are included in the response headers. - This is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/prefetch_preload", - body=await async_maybe_transform({"value": value}, prefetch_preload_edit_params.PrefetchPreloadEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PrefetchPreload]]._unwrapper, - ), - cast_to=cast(Type[Optional[PrefetchPreload]], ResultWrapper[PrefetchPreload]), - ) - - async def get( - self, - *, - zone_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[PrefetchPreload]: - """ - Cloudflare will prefetch any URLs that are included in the response headers. - This is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/prefetch_preload", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PrefetchPreload]]._unwrapper, - ), - cast_to=cast(Type[Optional[PrefetchPreload]], ResultWrapper[PrefetchPreload]), - ) - - -class PrefetchPreloadResourceWithRawResponse: - def __init__(self, prefetch_preload: PrefetchPreloadResource) -> None: - self._prefetch_preload = prefetch_preload - - self.edit = to_raw_response_wrapper( - prefetch_preload.edit, - ) - self.get = to_raw_response_wrapper( - prefetch_preload.get, - ) - - -class AsyncPrefetchPreloadResourceWithRawResponse: - def __init__(self, prefetch_preload: AsyncPrefetchPreloadResource) -> None: - self._prefetch_preload = prefetch_preload - - self.edit = async_to_raw_response_wrapper( - prefetch_preload.edit, - ) - self.get = async_to_raw_response_wrapper( - prefetch_preload.get, - ) - - -class PrefetchPreloadResourceWithStreamingResponse: - def __init__(self, prefetch_preload: PrefetchPreloadResource) -> None: - self._prefetch_preload = prefetch_preload - - self.edit = to_streamed_response_wrapper( - prefetch_preload.edit, - ) - self.get = to_streamed_response_wrapper( - prefetch_preload.get, - ) - - -class AsyncPrefetchPreloadResourceWithStreamingResponse: - def __init__(self, prefetch_preload: AsyncPrefetchPreloadResource) -> None: - self._prefetch_preload = prefetch_preload - - self.edit = async_to_streamed_response_wrapper( - prefetch_preload.edit, - ) - self.get = async_to_streamed_response_wrapper( - prefetch_preload.get, - ) diff --git a/src/cloudflare/resources/zones/settings/proxy_read_timeout.py b/src/cloudflare/resources/zones/settings/proxy_read_timeout.py deleted file mode 100644 index 1fd18b0cf77..00000000000 --- a/src/cloudflare/resources/zones/settings/proxy_read_timeout.py +++ /dev/null @@ -1,264 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import ProxyReadTimeout, proxy_read_timeout_edit_params -from ....types.zones.settings.proxy_read_timeout import ProxyReadTimeout -from ....types.zones.settings.proxy_read_timeout_param import ProxyReadTimeoutParam - -__all__ = ["ProxyReadTimeoutResource", "AsyncProxyReadTimeoutResource"] - - -class ProxyReadTimeoutResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ProxyReadTimeoutResourceWithRawResponse: - return ProxyReadTimeoutResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ProxyReadTimeoutResourceWithStreamingResponse: - return ProxyReadTimeoutResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: ProxyReadTimeoutParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ProxyReadTimeout]: - """ - Maximum time between two read operations from origin. - - Args: - zone_id: Identifier - - value: Maximum time between two read operations from origin. - - 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}/settings/proxy_read_timeout", - body=maybe_transform({"value": value}, proxy_read_timeout_edit_params.ProxyReadTimeoutEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ProxyReadTimeout]]._unwrapper, - ), - cast_to=cast(Type[Optional[ProxyReadTimeout]], ResultWrapper[ProxyReadTimeout]), - ) - - def get( - self, - *, - zone_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[ProxyReadTimeout]: - """ - Maximum time between two read operations from origin. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/proxy_read_timeout", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ProxyReadTimeout]]._unwrapper, - ), - cast_to=cast(Type[Optional[ProxyReadTimeout]], ResultWrapper[ProxyReadTimeout]), - ) - - -class AsyncProxyReadTimeoutResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncProxyReadTimeoutResourceWithRawResponse: - return AsyncProxyReadTimeoutResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncProxyReadTimeoutResourceWithStreamingResponse: - return AsyncProxyReadTimeoutResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: ProxyReadTimeoutParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ProxyReadTimeout]: - """ - Maximum time between two read operations from origin. - - Args: - zone_id: Identifier - - value: Maximum time between two read operations from origin. - - 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}/settings/proxy_read_timeout", - body=await async_maybe_transform( - {"value": value}, proxy_read_timeout_edit_params.ProxyReadTimeoutEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ProxyReadTimeout]]._unwrapper, - ), - cast_to=cast(Type[Optional[ProxyReadTimeout]], ResultWrapper[ProxyReadTimeout]), - ) - - async def get( - self, - *, - zone_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[ProxyReadTimeout]: - """ - Maximum time between two read operations from origin. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/proxy_read_timeout", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ProxyReadTimeout]]._unwrapper, - ), - cast_to=cast(Type[Optional[ProxyReadTimeout]], ResultWrapper[ProxyReadTimeout]), - ) - - -class ProxyReadTimeoutResourceWithRawResponse: - def __init__(self, proxy_read_timeout: ProxyReadTimeoutResource) -> None: - self._proxy_read_timeout = proxy_read_timeout - - self.edit = to_raw_response_wrapper( - proxy_read_timeout.edit, - ) - self.get = to_raw_response_wrapper( - proxy_read_timeout.get, - ) - - -class AsyncProxyReadTimeoutResourceWithRawResponse: - def __init__(self, proxy_read_timeout: AsyncProxyReadTimeoutResource) -> None: - self._proxy_read_timeout = proxy_read_timeout - - self.edit = async_to_raw_response_wrapper( - proxy_read_timeout.edit, - ) - self.get = async_to_raw_response_wrapper( - proxy_read_timeout.get, - ) - - -class ProxyReadTimeoutResourceWithStreamingResponse: - def __init__(self, proxy_read_timeout: ProxyReadTimeoutResource) -> None: - self._proxy_read_timeout = proxy_read_timeout - - self.edit = to_streamed_response_wrapper( - proxy_read_timeout.edit, - ) - self.get = to_streamed_response_wrapper( - proxy_read_timeout.get, - ) - - -class AsyncProxyReadTimeoutResourceWithStreamingResponse: - def __init__(self, proxy_read_timeout: AsyncProxyReadTimeoutResource) -> None: - self._proxy_read_timeout = proxy_read_timeout - - self.edit = async_to_streamed_response_wrapper( - proxy_read_timeout.edit, - ) - self.get = async_to_streamed_response_wrapper( - proxy_read_timeout.get, - ) diff --git a/src/cloudflare/resources/zones/settings/pseudo_ipv4.py b/src/cloudflare/resources/zones/settings/pseudo_ipv4.py deleted file mode 100644 index c30371d3e58..00000000000 --- a/src/cloudflare/resources/zones/settings/pseudo_ipv4.py +++ /dev/null @@ -1,262 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import pseudo_ipv4_edit_params -from ....types.zones.settings.pseudo_ipv4 import PseudoIPV4 - -__all__ = ["PseudoIPV4Resource", "AsyncPseudoIPV4Resource"] - - -class PseudoIPV4Resource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> PseudoIPV4ResourceWithRawResponse: - return PseudoIPV4ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> PseudoIPV4ResourceWithStreamingResponse: - return PseudoIPV4ResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["off", "add_header", "overwrite_header"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[PseudoIPV4]: - """ - Value of the Pseudo IPv4 setting. - - Args: - zone_id: Identifier - - value: Value of the Pseudo IPv4 setting. - - 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}/settings/pseudo_ipv4", - body=maybe_transform({"value": value}, pseudo_ipv4_edit_params.PseudoIPV4EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PseudoIPV4]]._unwrapper, - ), - cast_to=cast(Type[Optional[PseudoIPV4]], ResultWrapper[PseudoIPV4]), - ) - - def get( - self, - *, - zone_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[PseudoIPV4]: - """ - Value of the Pseudo IPv4 setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/pseudo_ipv4", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PseudoIPV4]]._unwrapper, - ), - cast_to=cast(Type[Optional[PseudoIPV4]], ResultWrapper[PseudoIPV4]), - ) - - -class AsyncPseudoIPV4Resource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncPseudoIPV4ResourceWithRawResponse: - return AsyncPseudoIPV4ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncPseudoIPV4ResourceWithStreamingResponse: - return AsyncPseudoIPV4ResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["off", "add_header", "overwrite_header"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[PseudoIPV4]: - """ - Value of the Pseudo IPv4 setting. - - Args: - zone_id: Identifier - - value: Value of the Pseudo IPv4 setting. - - 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}/settings/pseudo_ipv4", - body=await async_maybe_transform({"value": value}, pseudo_ipv4_edit_params.PseudoIPV4EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PseudoIPV4]]._unwrapper, - ), - cast_to=cast(Type[Optional[PseudoIPV4]], ResultWrapper[PseudoIPV4]), - ) - - async def get( - self, - *, - zone_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[PseudoIPV4]: - """ - Value of the Pseudo IPv4 setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/pseudo_ipv4", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[PseudoIPV4]]._unwrapper, - ), - cast_to=cast(Type[Optional[PseudoIPV4]], ResultWrapper[PseudoIPV4]), - ) - - -class PseudoIPV4ResourceWithRawResponse: - def __init__(self, pseudo_ipv4: PseudoIPV4Resource) -> None: - self._pseudo_ipv4 = pseudo_ipv4 - - self.edit = to_raw_response_wrapper( - pseudo_ipv4.edit, - ) - self.get = to_raw_response_wrapper( - pseudo_ipv4.get, - ) - - -class AsyncPseudoIPV4ResourceWithRawResponse: - def __init__(self, pseudo_ipv4: AsyncPseudoIPV4Resource) -> None: - self._pseudo_ipv4 = pseudo_ipv4 - - self.edit = async_to_raw_response_wrapper( - pseudo_ipv4.edit, - ) - self.get = async_to_raw_response_wrapper( - pseudo_ipv4.get, - ) - - -class PseudoIPV4ResourceWithStreamingResponse: - def __init__(self, pseudo_ipv4: PseudoIPV4Resource) -> None: - self._pseudo_ipv4 = pseudo_ipv4 - - self.edit = to_streamed_response_wrapper( - pseudo_ipv4.edit, - ) - self.get = to_streamed_response_wrapper( - pseudo_ipv4.get, - ) - - -class AsyncPseudoIPV4ResourceWithStreamingResponse: - def __init__(self, pseudo_ipv4: AsyncPseudoIPV4Resource) -> None: - self._pseudo_ipv4 = pseudo_ipv4 - - self.edit = async_to_streamed_response_wrapper( - pseudo_ipv4.edit, - ) - self.get = async_to_streamed_response_wrapper( - pseudo_ipv4.get, - ) diff --git a/src/cloudflare/resources/zones/settings/response_buffering.py b/src/cloudflare/resources/zones/settings/response_buffering.py deleted file mode 100644 index d00093ba87a..00000000000 --- a/src/cloudflare/resources/zones/settings/response_buffering.py +++ /dev/null @@ -1,280 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import response_buffering_edit_params -from ....types.zones.settings.response_buffering import ResponseBuffering - -__all__ = ["ResponseBufferingResource", "AsyncResponseBufferingResource"] - - -class ResponseBufferingResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ResponseBufferingResourceWithRawResponse: - return ResponseBufferingResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ResponseBufferingResourceWithStreamingResponse: - return ResponseBufferingResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ResponseBuffering]: - """Enables or disables buffering of responses from the proxied server. - - Cloudflare - may buffer the whole payload to deliver it at once to the client versus allowing - it to be delivered in chunks. By default, the proxied server streams directly - and is not buffered by Cloudflare. This is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/response_buffering", - body=maybe_transform({"value": value}, response_buffering_edit_params.ResponseBufferingEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ResponseBuffering]]._unwrapper, - ), - cast_to=cast(Type[Optional[ResponseBuffering]], ResultWrapper[ResponseBuffering]), - ) - - def get( - self, - *, - zone_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[ResponseBuffering]: - """Enables or disables buffering of responses from the proxied server. - - Cloudflare - may buffer the whole payload to deliver it at once to the client versus allowing - it to be delivered in chunks. By default, the proxied server streams directly - and is not buffered by Cloudflare. This is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/response_buffering", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ResponseBuffering]]._unwrapper, - ), - cast_to=cast(Type[Optional[ResponseBuffering]], ResultWrapper[ResponseBuffering]), - ) - - -class AsyncResponseBufferingResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncResponseBufferingResourceWithRawResponse: - return AsyncResponseBufferingResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncResponseBufferingResourceWithStreamingResponse: - return AsyncResponseBufferingResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ResponseBuffering]: - """Enables or disables buffering of responses from the proxied server. - - Cloudflare - may buffer the whole payload to deliver it at once to the client versus allowing - it to be delivered in chunks. By default, the proxied server streams directly - and is not buffered by Cloudflare. This is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/response_buffering", - body=await async_maybe_transform( - {"value": value}, response_buffering_edit_params.ResponseBufferingEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ResponseBuffering]]._unwrapper, - ), - cast_to=cast(Type[Optional[ResponseBuffering]], ResultWrapper[ResponseBuffering]), - ) - - async def get( - self, - *, - zone_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[ResponseBuffering]: - """Enables or disables buffering of responses from the proxied server. - - Cloudflare - may buffer the whole payload to deliver it at once to the client versus allowing - it to be delivered in chunks. By default, the proxied server streams directly - and is not buffered by Cloudflare. This is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/response_buffering", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ResponseBuffering]]._unwrapper, - ), - cast_to=cast(Type[Optional[ResponseBuffering]], ResultWrapper[ResponseBuffering]), - ) - - -class ResponseBufferingResourceWithRawResponse: - def __init__(self, response_buffering: ResponseBufferingResource) -> None: - self._response_buffering = response_buffering - - self.edit = to_raw_response_wrapper( - response_buffering.edit, - ) - self.get = to_raw_response_wrapper( - response_buffering.get, - ) - - -class AsyncResponseBufferingResourceWithRawResponse: - def __init__(self, response_buffering: AsyncResponseBufferingResource) -> None: - self._response_buffering = response_buffering - - self.edit = async_to_raw_response_wrapper( - response_buffering.edit, - ) - self.get = async_to_raw_response_wrapper( - response_buffering.get, - ) - - -class ResponseBufferingResourceWithStreamingResponse: - def __init__(self, response_buffering: ResponseBufferingResource) -> None: - self._response_buffering = response_buffering - - self.edit = to_streamed_response_wrapper( - response_buffering.edit, - ) - self.get = to_streamed_response_wrapper( - response_buffering.get, - ) - - -class AsyncResponseBufferingResourceWithStreamingResponse: - def __init__(self, response_buffering: AsyncResponseBufferingResource) -> None: - self._response_buffering = response_buffering - - self.edit = async_to_streamed_response_wrapper( - response_buffering.edit, - ) - self.get = async_to_streamed_response_wrapper( - response_buffering.get, - ) diff --git a/src/cloudflare/resources/zones/settings/rocket_loader.py b/src/cloudflare/resources/zones/settings/rocket_loader.py deleted file mode 100644 index 0fbe364370d..00000000000 --- a/src/cloudflare/resources/zones/settings/rocket_loader.py +++ /dev/null @@ -1,316 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import RocketLoader, rocket_loader_edit_params -from ....types.zones.settings.rocket_loader import RocketLoader -from ....types.zones.settings.rocket_loader_param import RocketLoaderParam - -__all__ = ["RocketLoaderResource", "AsyncRocketLoaderResource"] - - -class RocketLoaderResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> RocketLoaderResourceWithRawResponse: - return RocketLoaderResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> RocketLoaderResourceWithStreamingResponse: - return RocketLoaderResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: RocketLoaderParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RocketLoader]: - """ - Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - prioritises rendering your content while loading your site's Javascript - asynchronously. Turning on Rocket Loader will immediately improve a web page's - rendering time sometimes measured as Time to First Paint (TTFP), and also the - `window.onload` time (assuming there is JavaScript on the page). This can have a - positive impact on your Google search ranking. When turned on, Rocket Loader - will automatically defer the loading of all Javascript referenced in your HTML, - with no configuration required. Refer to - [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - for more information. - - Args: - zone_id: Identifier - - value: Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - prioritises rendering your content while loading your site's Javascript - asynchronously. Turning on Rocket Loader will immediately improve a web page's - rendering time sometimes measured as Time to First Paint (TTFP), and also the - `window.onload` time (assuming there is JavaScript on the page). This can have a - positive impact on your Google search ranking. When turned on, Rocket Loader - will automatically defer the loading of all Javascript referenced in your HTML, - with no configuration required. Refer to - [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - for more information. - - 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}/settings/rocket_loader", - body=maybe_transform({"value": value}, rocket_loader_edit_params.RocketLoaderEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[RocketLoader]]._unwrapper, - ), - cast_to=cast(Type[Optional[RocketLoader]], ResultWrapper[RocketLoader]), - ) - - def get( - self, - *, - zone_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[RocketLoader]: - """ - Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - prioritises rendering your content while loading your site's Javascript - asynchronously. Turning on Rocket Loader will immediately improve a web page's - rendering time sometimes measured as Time to First Paint (TTFP), and also the - `window.onload` time (assuming there is JavaScript on the page). This can have a - positive impact on your Google search ranking. When turned on, Rocket Loader - will automatically defer the loading of all Javascript referenced in your HTML, - with no configuration required. Refer to - [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/rocket_loader", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[RocketLoader]]._unwrapper, - ), - cast_to=cast(Type[Optional[RocketLoader]], ResultWrapper[RocketLoader]), - ) - - -class AsyncRocketLoaderResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncRocketLoaderResourceWithRawResponse: - return AsyncRocketLoaderResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncRocketLoaderResourceWithStreamingResponse: - return AsyncRocketLoaderResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: RocketLoaderParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RocketLoader]: - """ - Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - prioritises rendering your content while loading your site's Javascript - asynchronously. Turning on Rocket Loader will immediately improve a web page's - rendering time sometimes measured as Time to First Paint (TTFP), and also the - `window.onload` time (assuming there is JavaScript on the page). This can have a - positive impact on your Google search ranking. When turned on, Rocket Loader - will automatically defer the loading of all Javascript referenced in your HTML, - with no configuration required. Refer to - [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - for more information. - - Args: - zone_id: Identifier - - value: Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - prioritises rendering your content while loading your site's Javascript - asynchronously. Turning on Rocket Loader will immediately improve a web page's - rendering time sometimes measured as Time to First Paint (TTFP), and also the - `window.onload` time (assuming there is JavaScript on the page). This can have a - positive impact on your Google search ranking. When turned on, Rocket Loader - will automatically defer the loading of all Javascript referenced in your HTML, - with no configuration required. Refer to - [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - for more information. - - 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}/settings/rocket_loader", - body=await async_maybe_transform({"value": value}, rocket_loader_edit_params.RocketLoaderEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[RocketLoader]]._unwrapper, - ), - cast_to=cast(Type[Optional[RocketLoader]], ResultWrapper[RocketLoader]), - ) - - async def get( - self, - *, - zone_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[RocketLoader]: - """ - Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - prioritises rendering your content while loading your site's Javascript - asynchronously. Turning on Rocket Loader will immediately improve a web page's - rendering time sometimes measured as Time to First Paint (TTFP), and also the - `window.onload` time (assuming there is JavaScript on the page). This can have a - positive impact on your Google search ranking. When turned on, Rocket Loader - will automatically defer the loading of all Javascript referenced in your HTML, - with no configuration required. Refer to - [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - for more information. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/rocket_loader", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[RocketLoader]]._unwrapper, - ), - cast_to=cast(Type[Optional[RocketLoader]], ResultWrapper[RocketLoader]), - ) - - -class RocketLoaderResourceWithRawResponse: - def __init__(self, rocket_loader: RocketLoaderResource) -> None: - self._rocket_loader = rocket_loader - - self.edit = to_raw_response_wrapper( - rocket_loader.edit, - ) - self.get = to_raw_response_wrapper( - rocket_loader.get, - ) - - -class AsyncRocketLoaderResourceWithRawResponse: - def __init__(self, rocket_loader: AsyncRocketLoaderResource) -> None: - self._rocket_loader = rocket_loader - - self.edit = async_to_raw_response_wrapper( - rocket_loader.edit, - ) - self.get = async_to_raw_response_wrapper( - rocket_loader.get, - ) - - -class RocketLoaderResourceWithStreamingResponse: - def __init__(self, rocket_loader: RocketLoaderResource) -> None: - self._rocket_loader = rocket_loader - - self.edit = to_streamed_response_wrapper( - rocket_loader.edit, - ) - self.get = to_streamed_response_wrapper( - rocket_loader.get, - ) - - -class AsyncRocketLoaderResourceWithStreamingResponse: - def __init__(self, rocket_loader: AsyncRocketLoaderResource) -> None: - self._rocket_loader = rocket_loader - - self.edit = async_to_streamed_response_wrapper( - rocket_loader.edit, - ) - self.get = async_to_streamed_response_wrapper( - rocket_loader.get, - ) diff --git a/src/cloudflare/resources/zones/settings/security_headers.py b/src/cloudflare/resources/zones/settings/security_headers.py deleted file mode 100644 index 5c97da0cea2..00000000000 --- a/src/cloudflare/resources/zones/settings/security_headers.py +++ /dev/null @@ -1,257 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import security_header_edit_params -from ....types.zones.settings.security_headers import SecurityHeaders - -__all__ = ["SecurityHeadersResource", "AsyncSecurityHeadersResource"] - - -class SecurityHeadersResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> SecurityHeadersResourceWithRawResponse: - return SecurityHeadersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> SecurityHeadersResourceWithStreamingResponse: - return SecurityHeadersResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: security_header_edit_params.Value, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SecurityHeaders]: - """ - Cloudflare security header for a zone. - - Args: - zone_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 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}/settings/security_header", - body=maybe_transform({"value": value}, security_header_edit_params.SecurityHeaderEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityHeaders]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityHeaders]], ResultWrapper[SecurityHeaders]), - ) - - def get( - self, - *, - zone_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[SecurityHeaders]: - """ - Cloudflare security header for a zone. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/security_header", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityHeaders]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityHeaders]], ResultWrapper[SecurityHeaders]), - ) - - -class AsyncSecurityHeadersResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncSecurityHeadersResourceWithRawResponse: - return AsyncSecurityHeadersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSecurityHeadersResourceWithStreamingResponse: - return AsyncSecurityHeadersResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: security_header_edit_params.Value, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SecurityHeaders]: - """ - Cloudflare security header for a zone. - - Args: - zone_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 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}/settings/security_header", - body=await async_maybe_transform({"value": value}, security_header_edit_params.SecurityHeaderEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityHeaders]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityHeaders]], ResultWrapper[SecurityHeaders]), - ) - - async def get( - self, - *, - zone_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[SecurityHeaders]: - """ - Cloudflare security header for a zone. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/security_header", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityHeaders]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityHeaders]], ResultWrapper[SecurityHeaders]), - ) - - -class SecurityHeadersResourceWithRawResponse: - def __init__(self, security_headers: SecurityHeadersResource) -> None: - self._security_headers = security_headers - - self.edit = to_raw_response_wrapper( - security_headers.edit, - ) - self.get = to_raw_response_wrapper( - security_headers.get, - ) - - -class AsyncSecurityHeadersResourceWithRawResponse: - def __init__(self, security_headers: AsyncSecurityHeadersResource) -> None: - self._security_headers = security_headers - - self.edit = async_to_raw_response_wrapper( - security_headers.edit, - ) - self.get = async_to_raw_response_wrapper( - security_headers.get, - ) - - -class SecurityHeadersResourceWithStreamingResponse: - def __init__(self, security_headers: SecurityHeadersResource) -> None: - self._security_headers = security_headers - - self.edit = to_streamed_response_wrapper( - security_headers.edit, - ) - self.get = to_streamed_response_wrapper( - security_headers.get, - ) - - -class AsyncSecurityHeadersResourceWithStreamingResponse: - def __init__(self, security_headers: AsyncSecurityHeadersResource) -> None: - self._security_headers = security_headers - - self.edit = async_to_streamed_response_wrapper( - security_headers.edit, - ) - self.get = async_to_streamed_response_wrapper( - security_headers.get, - ) diff --git a/src/cloudflare/resources/zones/settings/security_level.py b/src/cloudflare/resources/zones/settings/security_level.py deleted file mode 100644 index af9040125a5..00000000000 --- a/src/cloudflare/resources/zones/settings/security_level.py +++ /dev/null @@ -1,274 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import security_level_edit_params -from ....types.zones.settings.security_level import SecurityLevel - -__all__ = ["SecurityLevelResource", "AsyncSecurityLevelResource"] - - -class SecurityLevelResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> SecurityLevelResourceWithRawResponse: - return SecurityLevelResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> SecurityLevelResourceWithStreamingResponse: - return SecurityLevelResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["off", "essentially_off", "low", "medium", "high", "under_attack"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SecurityLevel]: - """ - Choose the appropriate security profile for your website, which will - automatically adjust each of the security settings. If you choose to customize - an individual security setting, the profile will become Custom. - (https://support.cloudflare.com/hc/en-us/articles/200170056). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/security_level", - body=maybe_transform({"value": value}, security_level_edit_params.SecurityLevelEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityLevel]], ResultWrapper[SecurityLevel]), - ) - - def get( - self, - *, - zone_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[SecurityLevel]: - """ - Choose the appropriate security profile for your website, which will - automatically adjust each of the security settings. If you choose to customize - an individual security setting, the profile will become Custom. - (https://support.cloudflare.com/hc/en-us/articles/200170056). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/security_level", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityLevel]], ResultWrapper[SecurityLevel]), - ) - - -class AsyncSecurityLevelResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncSecurityLevelResourceWithRawResponse: - return AsyncSecurityLevelResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSecurityLevelResourceWithStreamingResponse: - return AsyncSecurityLevelResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["off", "essentially_off", "low", "medium", "high", "under_attack"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SecurityLevel]: - """ - Choose the appropriate security profile for your website, which will - automatically adjust each of the security settings. If you choose to customize - an individual security setting, the profile will become Custom. - (https://support.cloudflare.com/hc/en-us/articles/200170056). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/security_level", - body=await async_maybe_transform({"value": value}, security_level_edit_params.SecurityLevelEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityLevel]], ResultWrapper[SecurityLevel]), - ) - - async def get( - self, - *, - zone_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[SecurityLevel]: - """ - Choose the appropriate security profile for your website, which will - automatically adjust each of the security settings. If you choose to customize - an individual security setting, the profile will become Custom. - (https://support.cloudflare.com/hc/en-us/articles/200170056). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/security_level", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SecurityLevel]]._unwrapper, - ), - cast_to=cast(Type[Optional[SecurityLevel]], ResultWrapper[SecurityLevel]), - ) - - -class SecurityLevelResourceWithRawResponse: - def __init__(self, security_level: SecurityLevelResource) -> None: - self._security_level = security_level - - self.edit = to_raw_response_wrapper( - security_level.edit, - ) - self.get = to_raw_response_wrapper( - security_level.get, - ) - - -class AsyncSecurityLevelResourceWithRawResponse: - def __init__(self, security_level: AsyncSecurityLevelResource) -> None: - self._security_level = security_level - - self.edit = async_to_raw_response_wrapper( - security_level.edit, - ) - self.get = async_to_raw_response_wrapper( - security_level.get, - ) - - -class SecurityLevelResourceWithStreamingResponse: - def __init__(self, security_level: SecurityLevelResource) -> None: - self._security_level = security_level - - self.edit = to_streamed_response_wrapper( - security_level.edit, - ) - self.get = to_streamed_response_wrapper( - security_level.get, - ) - - -class AsyncSecurityLevelResourceWithStreamingResponse: - def __init__(self, security_level: AsyncSecurityLevelResource) -> None: - self._security_level = security_level - - self.edit = async_to_streamed_response_wrapper( - security_level.edit, - ) - self.get = async_to_streamed_response_wrapper( - security_level.get, - ) diff --git a/src/cloudflare/resources/zones/settings/server_side_excludes.py b/src/cloudflare/resources/zones/settings/server_side_excludes.py deleted file mode 100644 index b84f8e70b19..00000000000 --- a/src/cloudflare/resources/zones/settings/server_side_excludes.py +++ /dev/null @@ -1,304 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import server_side_exclude_edit_params -from ....types.zones.settings.server_side_excludes import ServerSideExcludes - -__all__ = ["ServerSideExcludesResource", "AsyncServerSideExcludesResource"] - - -class ServerSideExcludesResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ServerSideExcludesResourceWithRawResponse: - return ServerSideExcludesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ServerSideExcludesResourceWithStreamingResponse: - return ServerSideExcludesResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ServerSideExcludes]: - """ - If there is sensitive content on your website that you want visible to real - visitors, but that you want to hide from suspicious visitors, all you have to do - is wrap the content with Cloudflare SSE tags. Wrap any content that you want to - be excluded from suspicious visitors in the following SSE tags: - . For example: Bad visitors won't see my phone - number, 555-555-5555 . Note: SSE only will work with HTML. If you - have HTML minification enabled, you won't see the SSE tags in your HTML source - when it's served through Cloudflare. SSE will still function in this case, as - Cloudflare's HTML minification and SSE functionality occur on-the-fly as the - resource moves through our network to the visitor's computer. - (https://support.cloudflare.com/hc/en-us/articles/200170036). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/server_side_exclude", - body=maybe_transform({"value": value}, server_side_exclude_edit_params.ServerSideExcludeEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ServerSideExcludes]]._unwrapper, - ), - cast_to=cast(Type[Optional[ServerSideExcludes]], ResultWrapper[ServerSideExcludes]), - ) - - def get( - self, - *, - zone_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[ServerSideExcludes]: - """ - If there is sensitive content on your website that you want visible to real - visitors, but that you want to hide from suspicious visitors, all you have to do - is wrap the content with Cloudflare SSE tags. Wrap any content that you want to - be excluded from suspicious visitors in the following SSE tags: - . For example: Bad visitors won't see my phone - number, 555-555-5555 . Note: SSE only will work with HTML. If you - have HTML minification enabled, you won't see the SSE tags in your HTML source - when it's served through Cloudflare. SSE will still function in this case, as - Cloudflare's HTML minification and SSE functionality occur on-the-fly as the - resource moves through our network to the visitor's computer. - (https://support.cloudflare.com/hc/en-us/articles/200170036). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/server_side_exclude", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ServerSideExcludes]]._unwrapper, - ), - cast_to=cast(Type[Optional[ServerSideExcludes]], ResultWrapper[ServerSideExcludes]), - ) - - -class AsyncServerSideExcludesResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncServerSideExcludesResourceWithRawResponse: - return AsyncServerSideExcludesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncServerSideExcludesResourceWithStreamingResponse: - return AsyncServerSideExcludesResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ServerSideExcludes]: - """ - If there is sensitive content on your website that you want visible to real - visitors, but that you want to hide from suspicious visitors, all you have to do - is wrap the content with Cloudflare SSE tags. Wrap any content that you want to - be excluded from suspicious visitors in the following SSE tags: - . For example: Bad visitors won't see my phone - number, 555-555-5555 . Note: SSE only will work with HTML. If you - have HTML minification enabled, you won't see the SSE tags in your HTML source - when it's served through Cloudflare. SSE will still function in this case, as - Cloudflare's HTML minification and SSE functionality occur on-the-fly as the - resource moves through our network to the visitor's computer. - (https://support.cloudflare.com/hc/en-us/articles/200170036). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/server_side_exclude", - body=await async_maybe_transform( - {"value": value}, server_side_exclude_edit_params.ServerSideExcludeEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ServerSideExcludes]]._unwrapper, - ), - cast_to=cast(Type[Optional[ServerSideExcludes]], ResultWrapper[ServerSideExcludes]), - ) - - async def get( - self, - *, - zone_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[ServerSideExcludes]: - """ - If there is sensitive content on your website that you want visible to real - visitors, but that you want to hide from suspicious visitors, all you have to do - is wrap the content with Cloudflare SSE tags. Wrap any content that you want to - be excluded from suspicious visitors in the following SSE tags: - . For example: Bad visitors won't see my phone - number, 555-555-5555 . Note: SSE only will work with HTML. If you - have HTML minification enabled, you won't see the SSE tags in your HTML source - when it's served through Cloudflare. SSE will still function in this case, as - Cloudflare's HTML minification and SSE functionality occur on-the-fly as the - resource moves through our network to the visitor's computer. - (https://support.cloudflare.com/hc/en-us/articles/200170036). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/server_side_exclude", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ServerSideExcludes]]._unwrapper, - ), - cast_to=cast(Type[Optional[ServerSideExcludes]], ResultWrapper[ServerSideExcludes]), - ) - - -class ServerSideExcludesResourceWithRawResponse: - def __init__(self, server_side_excludes: ServerSideExcludesResource) -> None: - self._server_side_excludes = server_side_excludes - - self.edit = to_raw_response_wrapper( - server_side_excludes.edit, - ) - self.get = to_raw_response_wrapper( - server_side_excludes.get, - ) - - -class AsyncServerSideExcludesResourceWithRawResponse: - def __init__(self, server_side_excludes: AsyncServerSideExcludesResource) -> None: - self._server_side_excludes = server_side_excludes - - self.edit = async_to_raw_response_wrapper( - server_side_excludes.edit, - ) - self.get = async_to_raw_response_wrapper( - server_side_excludes.get, - ) - - -class ServerSideExcludesResourceWithStreamingResponse: - def __init__(self, server_side_excludes: ServerSideExcludesResource) -> None: - self._server_side_excludes = server_side_excludes - - self.edit = to_streamed_response_wrapper( - server_side_excludes.edit, - ) - self.get = to_streamed_response_wrapper( - server_side_excludes.get, - ) - - -class AsyncServerSideExcludesResourceWithStreamingResponse: - def __init__(self, server_side_excludes: AsyncServerSideExcludesResource) -> None: - self._server_side_excludes = server_side_excludes - - self.edit = async_to_streamed_response_wrapper( - server_side_excludes.edit, - ) - self.get = async_to_streamed_response_wrapper( - server_side_excludes.get, - ) diff --git a/src/cloudflare/resources/zones/settings/settings.py b/src/cloudflare/resources/zones/settings/settings.py index 5202b805f12..48b3522b37e 100644 --- a/src/cloudflare/resources/zones/settings/settings.py +++ b/src/cloudflare/resources/zones/settings/settings.py @@ -2,184 +2,8 @@ from __future__ import annotations -from .nel import ( - NELResource, - AsyncNELResource, - NELResourceWithRawResponse, - AsyncNELResourceWithRawResponse, - NELResourceWithStreamingResponse, - AsyncNELResourceWithStreamingResponse, -) -from .ssl import ( - SSLResource, - AsyncSSLResource, - SSLResourceWithRawResponse, - AsyncSSLResourceWithRawResponse, - SSLResourceWithStreamingResponse, - AsyncSSLResourceWithStreamingResponse, -) -from .waf import ( - WAFResource, - AsyncWAFResource, - WAFResourceWithRawResponse, - AsyncWAFResourceWithRawResponse, - WAFResourceWithStreamingResponse, - AsyncWAFResourceWithStreamingResponse, -) -from .ipv6 import ( - IPV6Resource, - AsyncIPV6Resource, - IPV6ResourceWithRawResponse, - AsyncIPV6ResourceWithRawResponse, - IPV6ResourceWithStreamingResponse, - AsyncIPV6ResourceWithStreamingResponse, -) -from .webp import ( - WebPResource, - AsyncWebPResource, - WebPResourceWithRawResponse, - AsyncWebPResourceWithRawResponse, - WebPResourceWithStreamingResponse, - AsyncWebPResourceWithStreamingResponse, -) -from .http2 import ( - HTTP2Resource, - AsyncHTTP2Resource, - HTTP2ResourceWithRawResponse, - AsyncHTTP2ResourceWithRawResponse, - HTTP2ResourceWithStreamingResponse, - AsyncHTTP2ResourceWithStreamingResponse, -) -from .http3 import ( - HTTP3Resource, - AsyncHTTP3Resource, - HTTP3ResourceWithRawResponse, - AsyncHTTP3ResourceWithRawResponse, - HTTP3ResourceWithStreamingResponse, - AsyncHTTP3ResourceWithStreamingResponse, -) -from .brotli import ( - BrotliResource, - AsyncBrotliResource, - BrotliResourceWithRawResponse, - AsyncBrotliResourceWithRawResponse, - BrotliResourceWithStreamingResponse, - AsyncBrotliResourceWithStreamingResponse, -) -from .minify import ( - MinifyResource, - AsyncMinifyResource, - MinifyResourceWithRawResponse, - AsyncMinifyResourceWithRawResponse, - MinifyResourceWithStreamingResponse, - AsyncMinifyResourceWithStreamingResponse, -) -from .mirage import ( - MirageResource, - AsyncMirageResource, - MirageResourceWithRawResponse, - AsyncMirageResourceWithRawResponse, - MirageResourceWithStreamingResponse, - AsyncMirageResourceWithStreamingResponse, -) -from .polish import ( - PolishResource, - AsyncPolishResource, - PolishResourceWithRawResponse, - AsyncPolishResourceWithRawResponse, - PolishResourceWithStreamingResponse, - AsyncPolishResourceWithStreamingResponse, -) -from .ciphers import ( - CiphersResource, - AsyncCiphersResource, - CiphersResourceWithRawResponse, - AsyncCiphersResourceWithRawResponse, - CiphersResourceWithStreamingResponse, - AsyncCiphersResourceWithStreamingResponse, -) -from .tls_1_3 import ( - TLS1_3Resource, - AsyncTLS1_3Resource, - TLS1_3ResourceWithRawResponse, - AsyncTLS1_3ResourceWithRawResponse, - TLS1_3ResourceWithStreamingResponse, - AsyncTLS1_3ResourceWithStreamingResponse, -) -from .zero_rtt import ( - ZeroRTTResource, - AsyncZeroRTTResource, - ZeroRTTResourceWithRawResponse, - AsyncZeroRTTResourceWithRawResponse, - ZeroRTTResourceWithStreamingResponse, - AsyncZeroRTTResourceWithStreamingResponse, -) -from .websocket import ( - WebsocketResource, - AsyncWebsocketResource, - WebsocketResourceWithRawResponse, - AsyncWebsocketResourceWithRawResponse, - WebsocketResourceWithStreamingResponse, - AsyncWebsocketResourceWithStreamingResponse, -) from ...._compat import cached_property -from .cache_level import ( - CacheLevelResource, - AsyncCacheLevelResource, - CacheLevelResourceWithRawResponse, - AsyncCacheLevelResourceWithRawResponse, - CacheLevelResourceWithStreamingResponse, - AsyncCacheLevelResourceWithStreamingResponse, -) -from .early_hints import ( - EarlyHintsResource, - AsyncEarlyHintsResource, - EarlyHintsResourceWithRawResponse, - AsyncEarlyHintsResourceWithRawResponse, - EarlyHintsResourceWithStreamingResponse, - AsyncEarlyHintsResourceWithStreamingResponse, -) -from .pseudo_ipv4 import ( - PseudoIPV4Resource, - AsyncPseudoIPV4Resource, - PseudoIPV4ResourceWithRawResponse, - AsyncPseudoIPV4ResourceWithRawResponse, - PseudoIPV4ResourceWithStreamingResponse, - AsyncPseudoIPV4ResourceWithStreamingResponse, -) from ...._resource import SyncAPIResource, AsyncAPIResource -from .advanced_ddos import ( - AdvancedDDoSResource, - AsyncAdvancedDDoSResource, - AdvancedDDoSResourceWithRawResponse, - AsyncAdvancedDDoSResourceWithRawResponse, - AdvancedDDoSResourceWithStreamingResponse, - AsyncAdvancedDDoSResourceWithStreamingResponse, -) -from .always_online import ( - AlwaysOnlineResource, - AsyncAlwaysOnlineResource, - AlwaysOnlineResourceWithRawResponse, - AsyncAlwaysOnlineResourceWithRawResponse, - AlwaysOnlineResourceWithStreamingResponse, - AsyncAlwaysOnlineResourceWithStreamingResponse, -) -from .browser_check import ( - BrowserCheckResource, - AsyncBrowserCheckResource, - BrowserCheckResourceWithRawResponse, - AsyncBrowserCheckResourceWithRawResponse, - BrowserCheckResourceWithStreamingResponse, - AsyncBrowserCheckResourceWithStreamingResponse, -) -from .challenge_ttl import ( - ChallengeTTLResource, - AsyncChallengeTTLResource, - ChallengeTTLResourceWithRawResponse, - AsyncChallengeTTLResourceWithRawResponse, - ChallengeTTLResourceWithStreamingResponse, - AsyncChallengeTTLResourceWithStreamingResponse, -) from .font_settings import ( FontSettingsResource, AsyncFontSettingsResource, @@ -188,182 +12,6 @@ FontSettingsResourceWithStreamingResponse, AsyncFontSettingsResourceWithStreamingResponse, ) -from .rocket_loader import ( - RocketLoaderResource, - AsyncRocketLoaderResource, - RocketLoaderResourceWithRawResponse, - AsyncRocketLoaderResourceWithRawResponse, - RocketLoaderResourceWithStreamingResponse, - AsyncRocketLoaderResourceWithStreamingResponse, -) -from .image_resizing import ( - ImageResizingResource, - AsyncImageResizingResource, - ImageResizingResourceWithRawResponse, - AsyncImageResizingResourceWithRawResponse, - ImageResizingResourceWithStreamingResponse, - AsyncImageResizingResourceWithStreamingResponse, -) -from .ip_geolocation import ( - IPGeolocationResource, - AsyncIPGeolocationResource, - IPGeolocationResourceWithRawResponse, - AsyncIPGeolocationResourceWithRawResponse, - IPGeolocationResourceWithStreamingResponse, - AsyncIPGeolocationResourceWithStreamingResponse, -) -from .security_level import ( - SecurityLevelResource, - AsyncSecurityLevelResource, - SecurityLevelResourceWithRawResponse, - AsyncSecurityLevelResourceWithRawResponse, - SecurityLevelResourceWithStreamingResponse, - AsyncSecurityLevelResourceWithStreamingResponse, -) -from .min_tls_version import ( - MinTLSVersionResource, - AsyncMinTLSVersionResource, - MinTLSVersionResourceWithRawResponse, - AsyncMinTLSVersionResourceWithRawResponse, - MinTLSVersionResourceWithStreamingResponse, - AsyncMinTLSVersionResourceWithStreamingResponse, -) -from .mobile_redirect import ( - MobileRedirectResource, - AsyncMobileRedirectResource, - MobileRedirectResourceWithRawResponse, - AsyncMobileRedirectResourceWithRawResponse, - MobileRedirectResourceWithStreamingResponse, - AsyncMobileRedirectResourceWithStreamingResponse, -) -from .ssl_recommender import ( - SSLRecommenderResource, - AsyncSSLRecommenderResource, - SSLRecommenderResourceWithRawResponse, - AsyncSSLRecommenderResourceWithRawResponse, - SSLRecommenderResourceWithStreamingResponse, - AsyncSSLRecommenderResourceWithStreamingResponse, -) -from .tls_client_auth import ( - TLSClientAuthResource, - AsyncTLSClientAuthResource, - TLSClientAuthResourceWithRawResponse, - AsyncTLSClientAuthResourceWithRawResponse, - TLSClientAuthResourceWithStreamingResponse, - AsyncTLSClientAuthResourceWithStreamingResponse, -) -from .always_use_https import ( - AlwaysUseHTTPSResource, - AsyncAlwaysUseHTTPSResource, - AlwaysUseHTTPSResourceWithRawResponse, - AsyncAlwaysUseHTTPSResourceWithRawResponse, - AlwaysUseHTTPSResourceWithStreamingResponse, - AsyncAlwaysUseHTTPSResourceWithStreamingResponse, -) -from .development_mode import ( - DevelopmentModeResource, - AsyncDevelopmentModeResource, - DevelopmentModeResourceWithRawResponse, - AsyncDevelopmentModeResourceWithRawResponse, - DevelopmentModeResourceWithStreamingResponse, - AsyncDevelopmentModeResourceWithStreamingResponse, -) -from .orange_to_orange import ( - OrangeToOrangeResource, - AsyncOrangeToOrangeResource, - OrangeToOrangeResourceWithRawResponse, - AsyncOrangeToOrangeResourceWithRawResponse, - OrangeToOrangeResourceWithStreamingResponse, - AsyncOrangeToOrangeResourceWithStreamingResponse, -) -from .prefetch_preload import ( - PrefetchPreloadResource, - AsyncPrefetchPreloadResource, - PrefetchPreloadResourceWithRawResponse, - AsyncPrefetchPreloadResourceWithRawResponse, - PrefetchPreloadResourceWithStreamingResponse, - AsyncPrefetchPreloadResourceWithStreamingResponse, -) -from .security_headers import ( - SecurityHeadersResource, - AsyncSecurityHeadersResource, - SecurityHeadersResourceWithRawResponse, - AsyncSecurityHeadersResourceWithRawResponse, - SecurityHeadersResourceWithStreamingResponse, - AsyncSecurityHeadersResourceWithStreamingResponse, -) -from .browser_cache_ttl import ( - BrowserCacheTTLResource, - AsyncBrowserCacheTTLResource, - BrowserCacheTTLResourceWithRawResponse, - AsyncBrowserCacheTTLResourceWithRawResponse, - BrowserCacheTTLResourceWithStreamingResponse, - AsyncBrowserCacheTTLResourceWithStreamingResponse, -) -from .email_obfuscation import ( - EmailObfuscationResource, - AsyncEmailObfuscationResource, - EmailObfuscationResourceWithRawResponse, - AsyncEmailObfuscationResourceWithRawResponse, - EmailObfuscationResourceWithStreamingResponse, - AsyncEmailObfuscationResourceWithStreamingResponse, -) -from .h2_prioritization import ( - H2PrioritizationResource, - AsyncH2PrioritizationResource, - H2PrioritizationResourceWithRawResponse, - AsyncH2PrioritizationResourceWithRawResponse, - H2PrioritizationResourceWithStreamingResponse, - AsyncH2PrioritizationResourceWithStreamingResponse, -) -from .hotlink_protection import ( - HotlinkProtectionResource, - AsyncHotlinkProtectionResource, - HotlinkProtectionResourceWithRawResponse, - AsyncHotlinkProtectionResourceWithRawResponse, - HotlinkProtectionResourceWithStreamingResponse, - AsyncHotlinkProtectionResourceWithStreamingResponse, -) -from .proxy_read_timeout import ( - ProxyReadTimeoutResource, - AsyncProxyReadTimeoutResource, - ProxyReadTimeoutResourceWithRawResponse, - AsyncProxyReadTimeoutResourceWithRawResponse, - ProxyReadTimeoutResourceWithStreamingResponse, - AsyncProxyReadTimeoutResourceWithStreamingResponse, -) -from .response_buffering import ( - ResponseBufferingResource, - AsyncResponseBufferingResource, - ResponseBufferingResourceWithRawResponse, - AsyncResponseBufferingResourceWithRawResponse, - ResponseBufferingResourceWithStreamingResponse, - AsyncResponseBufferingResourceWithStreamingResponse, -) -from .opportunistic_onion import ( - OpportunisticOnionResource, - AsyncOpportunisticOnionResource, - OpportunisticOnionResourceWithRawResponse, - AsyncOpportunisticOnionResourceWithRawResponse, - OpportunisticOnionResourceWithStreamingResponse, - AsyncOpportunisticOnionResourceWithStreamingResponse, -) -from .server_side_excludes import ( - ServerSideExcludesResource, - AsyncServerSideExcludesResource, - ServerSideExcludesResourceWithRawResponse, - AsyncServerSideExcludesResourceWithRawResponse, - ServerSideExcludesResourceWithStreamingResponse, - AsyncServerSideExcludesResourceWithStreamingResponse, -) -from .true_client_ip_header import ( - TrueClientIPHeaderResource, - AsyncTrueClientIPHeaderResource, - TrueClientIPHeaderResourceWithRawResponse, - AsyncTrueClientIPHeaderResourceWithRawResponse, - TrueClientIPHeaderResourceWithStreamingResponse, - AsyncTrueClientIPHeaderResourceWithStreamingResponse, -) from .origin_max_http_version import ( OriginMaxHTTPVersionResource, AsyncOriginMaxHTTPVersionResource, @@ -372,251 +20,15 @@ OriginMaxHTTPVersionResourceWithStreamingResponse, AsyncOriginMaxHTTPVersionResourceWithStreamingResponse, ) -from .automatic_https_rewrites import ( - AutomaticHTTPSRewritesResource, - AsyncAutomaticHTTPSRewritesResource, - AutomaticHTTPSRewritesResourceWithRawResponse, - AsyncAutomaticHTTPSRewritesResourceWithRawResponse, - AutomaticHTTPSRewritesResourceWithStreamingResponse, - AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse, -) -from .opportunistic_encryption import ( - OpportunisticEncryptionResource, - AsyncOpportunisticEncryptionResource, - OpportunisticEncryptionResourceWithRawResponse, - AsyncOpportunisticEncryptionResourceWithRawResponse, - OpportunisticEncryptionResourceWithStreamingResponse, - AsyncOpportunisticEncryptionResourceWithStreamingResponse, -) -from .origin_error_page_pass_thru import ( - OriginErrorPagePassThruResource, - AsyncOriginErrorPagePassThruResource, - OriginErrorPagePassThruResourceWithRawResponse, - AsyncOriginErrorPagePassThruResourceWithRawResponse, - OriginErrorPagePassThruResourceWithStreamingResponse, - AsyncOriginErrorPagePassThruResourceWithStreamingResponse, -) -from .sort_query_string_for_cache import ( - SortQueryStringForCacheResource, - AsyncSortQueryStringForCacheResource, - SortQueryStringForCacheResourceWithRawResponse, - AsyncSortQueryStringForCacheResourceWithRawResponse, - SortQueryStringForCacheResourceWithStreamingResponse, - AsyncSortQueryStringForCacheResourceWithStreamingResponse, -) -from .automatic_platform_optimization import ( - AutomaticPlatformOptimizationResource, - AsyncAutomaticPlatformOptimizationResource, - AutomaticPlatformOptimizationResourceWithRawResponse, - AsyncAutomaticPlatformOptimizationResourceWithRawResponse, - AutomaticPlatformOptimizationResourceWithStreamingResponse, - AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse, -) __all__ = ["SettingsResource", "AsyncSettingsResource"] class SettingsResource(SyncAPIResource): - @cached_property - def zero_rtt(self) -> ZeroRTTResource: - return ZeroRTTResource(self._client) - - @cached_property - def advanced_ddos(self) -> AdvancedDDoSResource: - return AdvancedDDoSResource(self._client) - - @cached_property - def always_online(self) -> AlwaysOnlineResource: - return AlwaysOnlineResource(self._client) - - @cached_property - def always_use_https(self) -> AlwaysUseHTTPSResource: - return AlwaysUseHTTPSResource(self._client) - - @cached_property - def automatic_https_rewrites(self) -> AutomaticHTTPSRewritesResource: - return AutomaticHTTPSRewritesResource(self._client) - - @cached_property - def automatic_platform_optimization(self) -> AutomaticPlatformOptimizationResource: - return AutomaticPlatformOptimizationResource(self._client) - - @cached_property - def brotli(self) -> BrotliResource: - return BrotliResource(self._client) - - @cached_property - def browser_cache_ttl(self) -> BrowserCacheTTLResource: - return BrowserCacheTTLResource(self._client) - - @cached_property - def browser_check(self) -> BrowserCheckResource: - return BrowserCheckResource(self._client) - - @cached_property - def cache_level(self) -> CacheLevelResource: - return CacheLevelResource(self._client) - - @cached_property - def challenge_ttl(self) -> ChallengeTTLResource: - return ChallengeTTLResource(self._client) - - @cached_property - def ciphers(self) -> CiphersResource: - return CiphersResource(self._client) - - @cached_property - def development_mode(self) -> DevelopmentModeResource: - return DevelopmentModeResource(self._client) - - @cached_property - def early_hints(self) -> EarlyHintsResource: - return EarlyHintsResource(self._client) - - @cached_property - def email_obfuscation(self) -> EmailObfuscationResource: - return EmailObfuscationResource(self._client) - - @cached_property - def h2_prioritization(self) -> H2PrioritizationResource: - return H2PrioritizationResource(self._client) - - @cached_property - def hotlink_protection(self) -> HotlinkProtectionResource: - return HotlinkProtectionResource(self._client) - - @cached_property - def http2(self) -> HTTP2Resource: - return HTTP2Resource(self._client) - - @cached_property - def http3(self) -> HTTP3Resource: - return HTTP3Resource(self._client) - - @cached_property - def image_resizing(self) -> ImageResizingResource: - return ImageResizingResource(self._client) - - @cached_property - def ip_geolocation(self) -> IPGeolocationResource: - return IPGeolocationResource(self._client) - - @cached_property - def ipv6(self) -> IPV6Resource: - return IPV6Resource(self._client) - - @cached_property - def min_tls_version(self) -> MinTLSVersionResource: - return MinTLSVersionResource(self._client) - - @cached_property - def minify(self) -> MinifyResource: - return MinifyResource(self._client) - - @cached_property - def mirage(self) -> MirageResource: - return MirageResource(self._client) - - @cached_property - def mobile_redirect(self) -> MobileRedirectResource: - return MobileRedirectResource(self._client) - - @cached_property - def nel(self) -> NELResource: - return NELResource(self._client) - - @cached_property - def opportunistic_encryption(self) -> OpportunisticEncryptionResource: - return OpportunisticEncryptionResource(self._client) - - @cached_property - def opportunistic_onion(self) -> OpportunisticOnionResource: - return OpportunisticOnionResource(self._client) - - @cached_property - def orange_to_orange(self) -> OrangeToOrangeResource: - return OrangeToOrangeResource(self._client) - - @cached_property - def origin_error_page_pass_thru(self) -> OriginErrorPagePassThruResource: - return OriginErrorPagePassThruResource(self._client) - @cached_property def origin_max_http_version(self) -> OriginMaxHTTPVersionResource: return OriginMaxHTTPVersionResource(self._client) - @cached_property - def polish(self) -> PolishResource: - return PolishResource(self._client) - - @cached_property - def prefetch_preload(self) -> PrefetchPreloadResource: - return PrefetchPreloadResource(self._client) - - @cached_property - def proxy_read_timeout(self) -> ProxyReadTimeoutResource: - return ProxyReadTimeoutResource(self._client) - - @cached_property - def pseudo_ipv4(self) -> PseudoIPV4Resource: - return PseudoIPV4Resource(self._client) - - @cached_property - def response_buffering(self) -> ResponseBufferingResource: - return ResponseBufferingResource(self._client) - - @cached_property - def rocket_loader(self) -> RocketLoaderResource: - return RocketLoaderResource(self._client) - - @cached_property - def security_headers(self) -> SecurityHeadersResource: - return SecurityHeadersResource(self._client) - - @cached_property - def security_level(self) -> SecurityLevelResource: - return SecurityLevelResource(self._client) - - @cached_property - def server_side_excludes(self) -> ServerSideExcludesResource: - return ServerSideExcludesResource(self._client) - - @cached_property - def sort_query_string_for_cache(self) -> SortQueryStringForCacheResource: - return SortQueryStringForCacheResource(self._client) - - @cached_property - def ssl(self) -> SSLResource: - return SSLResource(self._client) - - @cached_property - def ssl_recommender(self) -> SSLRecommenderResource: - return SSLRecommenderResource(self._client) - - @cached_property - def tls_1_3(self) -> TLS1_3Resource: - return TLS1_3Resource(self._client) - - @cached_property - def tls_client_auth(self) -> TLSClientAuthResource: - return TLSClientAuthResource(self._client) - - @cached_property - def true_client_ip_header(self) -> TrueClientIPHeaderResource: - return TrueClientIPHeaderResource(self._client) - - @cached_property - def waf(self) -> WAFResource: - return WAFResource(self._client) - - @cached_property - def webp(self) -> WebPResource: - return WebPResource(self._client) - - @cached_property - def websocket(self) -> WebsocketResource: - return WebsocketResource(self._client) - @cached_property def font_settings(self) -> FontSettingsResource: return FontSettingsResource(self._client) @@ -631,1054 +43,70 @@ def with_streaming_response(self) -> SettingsResourceWithStreamingResponse: class AsyncSettingsResource(AsyncAPIResource): - @cached_property - def zero_rtt(self) -> AsyncZeroRTTResource: - return AsyncZeroRTTResource(self._client) - - @cached_property - def advanced_ddos(self) -> AsyncAdvancedDDoSResource: - return AsyncAdvancedDDoSResource(self._client) - - @cached_property - def always_online(self) -> AsyncAlwaysOnlineResource: - return AsyncAlwaysOnlineResource(self._client) - - @cached_property - def always_use_https(self) -> AsyncAlwaysUseHTTPSResource: - return AsyncAlwaysUseHTTPSResource(self._client) - - @cached_property - def automatic_https_rewrites(self) -> AsyncAutomaticHTTPSRewritesResource: - return AsyncAutomaticHTTPSRewritesResource(self._client) - - @cached_property - def automatic_platform_optimization(self) -> AsyncAutomaticPlatformOptimizationResource: - return AsyncAutomaticPlatformOptimizationResource(self._client) - - @cached_property - def brotli(self) -> AsyncBrotliResource: - return AsyncBrotliResource(self._client) - - @cached_property - def browser_cache_ttl(self) -> AsyncBrowserCacheTTLResource: - return AsyncBrowserCacheTTLResource(self._client) - - @cached_property - def browser_check(self) -> AsyncBrowserCheckResource: - return AsyncBrowserCheckResource(self._client) - - @cached_property - def cache_level(self) -> AsyncCacheLevelResource: - return AsyncCacheLevelResource(self._client) - - @cached_property - def challenge_ttl(self) -> AsyncChallengeTTLResource: - return AsyncChallengeTTLResource(self._client) - - @cached_property - def ciphers(self) -> AsyncCiphersResource: - return AsyncCiphersResource(self._client) - - @cached_property - def development_mode(self) -> AsyncDevelopmentModeResource: - return AsyncDevelopmentModeResource(self._client) - - @cached_property - def early_hints(self) -> AsyncEarlyHintsResource: - return AsyncEarlyHintsResource(self._client) - - @cached_property - def email_obfuscation(self) -> AsyncEmailObfuscationResource: - return AsyncEmailObfuscationResource(self._client) - - @cached_property - def h2_prioritization(self) -> AsyncH2PrioritizationResource: - return AsyncH2PrioritizationResource(self._client) - - @cached_property - def hotlink_protection(self) -> AsyncHotlinkProtectionResource: - return AsyncHotlinkProtectionResource(self._client) - - @cached_property - def http2(self) -> AsyncHTTP2Resource: - return AsyncHTTP2Resource(self._client) - - @cached_property - def http3(self) -> AsyncHTTP3Resource: - return AsyncHTTP3Resource(self._client) - - @cached_property - def image_resizing(self) -> AsyncImageResizingResource: - return AsyncImageResizingResource(self._client) - - @cached_property - def ip_geolocation(self) -> AsyncIPGeolocationResource: - return AsyncIPGeolocationResource(self._client) - - @cached_property - def ipv6(self) -> AsyncIPV6Resource: - return AsyncIPV6Resource(self._client) - - @cached_property - def min_tls_version(self) -> AsyncMinTLSVersionResource: - return AsyncMinTLSVersionResource(self._client) - - @cached_property - def minify(self) -> AsyncMinifyResource: - return AsyncMinifyResource(self._client) - - @cached_property - def mirage(self) -> AsyncMirageResource: - return AsyncMirageResource(self._client) - - @cached_property - def mobile_redirect(self) -> AsyncMobileRedirectResource: - return AsyncMobileRedirectResource(self._client) - - @cached_property - def nel(self) -> AsyncNELResource: - return AsyncNELResource(self._client) - - @cached_property - def opportunistic_encryption(self) -> AsyncOpportunisticEncryptionResource: - return AsyncOpportunisticEncryptionResource(self._client) - - @cached_property - def opportunistic_onion(self) -> AsyncOpportunisticOnionResource: - return AsyncOpportunisticOnionResource(self._client) - - @cached_property - def orange_to_orange(self) -> AsyncOrangeToOrangeResource: - return AsyncOrangeToOrangeResource(self._client) - - @cached_property - def origin_error_page_pass_thru(self) -> AsyncOriginErrorPagePassThruResource: - return AsyncOriginErrorPagePassThruResource(self._client) - @cached_property def origin_max_http_version(self) -> AsyncOriginMaxHTTPVersionResource: return AsyncOriginMaxHTTPVersionResource(self._client) @cached_property - def polish(self) -> AsyncPolishResource: - return AsyncPolishResource(self._client) - - @cached_property - def prefetch_preload(self) -> AsyncPrefetchPreloadResource: - return AsyncPrefetchPreloadResource(self._client) - - @cached_property - def proxy_read_timeout(self) -> AsyncProxyReadTimeoutResource: - return AsyncProxyReadTimeoutResource(self._client) + def font_settings(self) -> AsyncFontSettingsResource: + return AsyncFontSettingsResource(self._client) @cached_property - def pseudo_ipv4(self) -> AsyncPseudoIPV4Resource: - return AsyncPseudoIPV4Resource(self._client) + def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse: + return AsyncSettingsResourceWithRawResponse(self) @cached_property - def response_buffering(self) -> AsyncResponseBufferingResource: - return AsyncResponseBufferingResource(self._client) + def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse: + return AsyncSettingsResourceWithStreamingResponse(self) - @cached_property - def rocket_loader(self) -> AsyncRocketLoaderResource: - return AsyncRocketLoaderResource(self._client) - @cached_property - def security_headers(self) -> AsyncSecurityHeadersResource: - return AsyncSecurityHeadersResource(self._client) +class SettingsResourceWithRawResponse: + def __init__(self, settings: SettingsResource) -> None: + self._settings = settings @cached_property - def security_level(self) -> AsyncSecurityLevelResource: - return AsyncSecurityLevelResource(self._client) + def origin_max_http_version(self) -> OriginMaxHTTPVersionResourceWithRawResponse: + return OriginMaxHTTPVersionResourceWithRawResponse(self._settings.origin_max_http_version) @cached_property - def server_side_excludes(self) -> AsyncServerSideExcludesResource: - return AsyncServerSideExcludesResource(self._client) + def font_settings(self) -> FontSettingsResourceWithRawResponse: + return FontSettingsResourceWithRawResponse(self._settings.font_settings) - @cached_property - def sort_query_string_for_cache(self) -> AsyncSortQueryStringForCacheResource: - return AsyncSortQueryStringForCacheResource(self._client) - @cached_property - def ssl(self) -> AsyncSSLResource: - return AsyncSSLResource(self._client) +class AsyncSettingsResourceWithRawResponse: + def __init__(self, settings: AsyncSettingsResource) -> None: + self._settings = settings @cached_property - def ssl_recommender(self) -> AsyncSSLRecommenderResource: - return AsyncSSLRecommenderResource(self._client) + def origin_max_http_version(self) -> AsyncOriginMaxHTTPVersionResourceWithRawResponse: + return AsyncOriginMaxHTTPVersionResourceWithRawResponse(self._settings.origin_max_http_version) @cached_property - def tls_1_3(self) -> AsyncTLS1_3Resource: - return AsyncTLS1_3Resource(self._client) + def font_settings(self) -> AsyncFontSettingsResourceWithRawResponse: + return AsyncFontSettingsResourceWithRawResponse(self._settings.font_settings) - @cached_property - def tls_client_auth(self) -> AsyncTLSClientAuthResource: - return AsyncTLSClientAuthResource(self._client) - @cached_property - def true_client_ip_header(self) -> AsyncTrueClientIPHeaderResource: - return AsyncTrueClientIPHeaderResource(self._client) +class SettingsResourceWithStreamingResponse: + def __init__(self, settings: SettingsResource) -> None: + self._settings = settings @cached_property - def waf(self) -> AsyncWAFResource: - return AsyncWAFResource(self._client) + def origin_max_http_version(self) -> OriginMaxHTTPVersionResourceWithStreamingResponse: + return OriginMaxHTTPVersionResourceWithStreamingResponse(self._settings.origin_max_http_version) @cached_property - def webp(self) -> AsyncWebPResource: - return AsyncWebPResource(self._client) + def font_settings(self) -> FontSettingsResourceWithStreamingResponse: + return FontSettingsResourceWithStreamingResponse(self._settings.font_settings) - @cached_property - def websocket(self) -> AsyncWebsocketResource: - return AsyncWebsocketResource(self._client) - @cached_property - def font_settings(self) -> AsyncFontSettingsResource: - return AsyncFontSettingsResource(self._client) - - @cached_property - def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse: - return AsyncSettingsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse: - return AsyncSettingsResourceWithStreamingResponse(self) - - -class SettingsResourceWithRawResponse: - def __init__(self, settings: SettingsResource) -> None: - self._settings = settings - - @cached_property - def zero_rtt(self) -> ZeroRTTResourceWithRawResponse: - return ZeroRTTResourceWithRawResponse(self._settings.zero_rtt) - - @cached_property - def advanced_ddos(self) -> AdvancedDDoSResourceWithRawResponse: - return AdvancedDDoSResourceWithRawResponse(self._settings.advanced_ddos) - - @cached_property - def always_online(self) -> AlwaysOnlineResourceWithRawResponse: - return AlwaysOnlineResourceWithRawResponse(self._settings.always_online) - - @cached_property - def always_use_https(self) -> AlwaysUseHTTPSResourceWithRawResponse: - return AlwaysUseHTTPSResourceWithRawResponse(self._settings.always_use_https) - - @cached_property - def automatic_https_rewrites(self) -> AutomaticHTTPSRewritesResourceWithRawResponse: - return AutomaticHTTPSRewritesResourceWithRawResponse(self._settings.automatic_https_rewrites) - - @cached_property - def automatic_platform_optimization(self) -> AutomaticPlatformOptimizationResourceWithRawResponse: - return AutomaticPlatformOptimizationResourceWithRawResponse(self._settings.automatic_platform_optimization) - - @cached_property - def brotli(self) -> BrotliResourceWithRawResponse: - return BrotliResourceWithRawResponse(self._settings.brotli) - - @cached_property - def browser_cache_ttl(self) -> BrowserCacheTTLResourceWithRawResponse: - return BrowserCacheTTLResourceWithRawResponse(self._settings.browser_cache_ttl) - - @cached_property - def browser_check(self) -> BrowserCheckResourceWithRawResponse: - return BrowserCheckResourceWithRawResponse(self._settings.browser_check) - - @cached_property - def cache_level(self) -> CacheLevelResourceWithRawResponse: - return CacheLevelResourceWithRawResponse(self._settings.cache_level) - - @cached_property - def challenge_ttl(self) -> ChallengeTTLResourceWithRawResponse: - return ChallengeTTLResourceWithRawResponse(self._settings.challenge_ttl) - - @cached_property - def ciphers(self) -> CiphersResourceWithRawResponse: - return CiphersResourceWithRawResponse(self._settings.ciphers) - - @cached_property - def development_mode(self) -> DevelopmentModeResourceWithRawResponse: - return DevelopmentModeResourceWithRawResponse(self._settings.development_mode) - - @cached_property - def early_hints(self) -> EarlyHintsResourceWithRawResponse: - return EarlyHintsResourceWithRawResponse(self._settings.early_hints) - - @cached_property - def email_obfuscation(self) -> EmailObfuscationResourceWithRawResponse: - return EmailObfuscationResourceWithRawResponse(self._settings.email_obfuscation) - - @cached_property - def h2_prioritization(self) -> H2PrioritizationResourceWithRawResponse: - return H2PrioritizationResourceWithRawResponse(self._settings.h2_prioritization) - - @cached_property - def hotlink_protection(self) -> HotlinkProtectionResourceWithRawResponse: - return HotlinkProtectionResourceWithRawResponse(self._settings.hotlink_protection) - - @cached_property - def http2(self) -> HTTP2ResourceWithRawResponse: - return HTTP2ResourceWithRawResponse(self._settings.http2) - - @cached_property - def http3(self) -> HTTP3ResourceWithRawResponse: - return HTTP3ResourceWithRawResponse(self._settings.http3) - - @cached_property - def image_resizing(self) -> ImageResizingResourceWithRawResponse: - return ImageResizingResourceWithRawResponse(self._settings.image_resizing) - - @cached_property - def ip_geolocation(self) -> IPGeolocationResourceWithRawResponse: - return IPGeolocationResourceWithRawResponse(self._settings.ip_geolocation) - - @cached_property - def ipv6(self) -> IPV6ResourceWithRawResponse: - return IPV6ResourceWithRawResponse(self._settings.ipv6) - - @cached_property - def min_tls_version(self) -> MinTLSVersionResourceWithRawResponse: - return MinTLSVersionResourceWithRawResponse(self._settings.min_tls_version) - - @cached_property - def minify(self) -> MinifyResourceWithRawResponse: - return MinifyResourceWithRawResponse(self._settings.minify) - - @cached_property - def mirage(self) -> MirageResourceWithRawResponse: - return MirageResourceWithRawResponse(self._settings.mirage) - - @cached_property - def mobile_redirect(self) -> MobileRedirectResourceWithRawResponse: - return MobileRedirectResourceWithRawResponse(self._settings.mobile_redirect) - - @cached_property - def nel(self) -> NELResourceWithRawResponse: - return NELResourceWithRawResponse(self._settings.nel) - - @cached_property - def opportunistic_encryption(self) -> OpportunisticEncryptionResourceWithRawResponse: - return OpportunisticEncryptionResourceWithRawResponse(self._settings.opportunistic_encryption) - - @cached_property - def opportunistic_onion(self) -> OpportunisticOnionResourceWithRawResponse: - return OpportunisticOnionResourceWithRawResponse(self._settings.opportunistic_onion) - - @cached_property - def orange_to_orange(self) -> OrangeToOrangeResourceWithRawResponse: - return OrangeToOrangeResourceWithRawResponse(self._settings.orange_to_orange) - - @cached_property - def origin_error_page_pass_thru(self) -> OriginErrorPagePassThruResourceWithRawResponse: - return OriginErrorPagePassThruResourceWithRawResponse(self._settings.origin_error_page_pass_thru) - - @cached_property - def origin_max_http_version(self) -> OriginMaxHTTPVersionResourceWithRawResponse: - return OriginMaxHTTPVersionResourceWithRawResponse(self._settings.origin_max_http_version) - - @cached_property - def polish(self) -> PolishResourceWithRawResponse: - return PolishResourceWithRawResponse(self._settings.polish) - - @cached_property - def prefetch_preload(self) -> PrefetchPreloadResourceWithRawResponse: - return PrefetchPreloadResourceWithRawResponse(self._settings.prefetch_preload) - - @cached_property - def proxy_read_timeout(self) -> ProxyReadTimeoutResourceWithRawResponse: - return ProxyReadTimeoutResourceWithRawResponse(self._settings.proxy_read_timeout) - - @cached_property - def pseudo_ipv4(self) -> PseudoIPV4ResourceWithRawResponse: - return PseudoIPV4ResourceWithRawResponse(self._settings.pseudo_ipv4) - - @cached_property - def response_buffering(self) -> ResponseBufferingResourceWithRawResponse: - return ResponseBufferingResourceWithRawResponse(self._settings.response_buffering) - - @cached_property - def rocket_loader(self) -> RocketLoaderResourceWithRawResponse: - return RocketLoaderResourceWithRawResponse(self._settings.rocket_loader) - - @cached_property - def security_headers(self) -> SecurityHeadersResourceWithRawResponse: - return SecurityHeadersResourceWithRawResponse(self._settings.security_headers) - - @cached_property - def security_level(self) -> SecurityLevelResourceWithRawResponse: - return SecurityLevelResourceWithRawResponse(self._settings.security_level) - - @cached_property - def server_side_excludes(self) -> ServerSideExcludesResourceWithRawResponse: - return ServerSideExcludesResourceWithRawResponse(self._settings.server_side_excludes) - - @cached_property - def sort_query_string_for_cache(self) -> SortQueryStringForCacheResourceWithRawResponse: - return SortQueryStringForCacheResourceWithRawResponse(self._settings.sort_query_string_for_cache) - - @cached_property - def ssl(self) -> SSLResourceWithRawResponse: - return SSLResourceWithRawResponse(self._settings.ssl) - - @cached_property - def ssl_recommender(self) -> SSLRecommenderResourceWithRawResponse: - return SSLRecommenderResourceWithRawResponse(self._settings.ssl_recommender) - - @cached_property - def tls_1_3(self) -> TLS1_3ResourceWithRawResponse: - return TLS1_3ResourceWithRawResponse(self._settings.tls_1_3) - - @cached_property - def tls_client_auth(self) -> TLSClientAuthResourceWithRawResponse: - return TLSClientAuthResourceWithRawResponse(self._settings.tls_client_auth) - - @cached_property - def true_client_ip_header(self) -> TrueClientIPHeaderResourceWithRawResponse: - return TrueClientIPHeaderResourceWithRawResponse(self._settings.true_client_ip_header) - - @cached_property - def waf(self) -> WAFResourceWithRawResponse: - return WAFResourceWithRawResponse(self._settings.waf) - - @cached_property - def webp(self) -> WebPResourceWithRawResponse: - return WebPResourceWithRawResponse(self._settings.webp) - - @cached_property - def websocket(self) -> WebsocketResourceWithRawResponse: - return WebsocketResourceWithRawResponse(self._settings.websocket) - - @cached_property - def font_settings(self) -> FontSettingsResourceWithRawResponse: - return FontSettingsResourceWithRawResponse(self._settings.font_settings) - - -class AsyncSettingsResourceWithRawResponse: - def __init__(self, settings: AsyncSettingsResource) -> None: - self._settings = settings - - @cached_property - def zero_rtt(self) -> AsyncZeroRTTResourceWithRawResponse: - return AsyncZeroRTTResourceWithRawResponse(self._settings.zero_rtt) - - @cached_property - def advanced_ddos(self) -> AsyncAdvancedDDoSResourceWithRawResponse: - return AsyncAdvancedDDoSResourceWithRawResponse(self._settings.advanced_ddos) - - @cached_property - def always_online(self) -> AsyncAlwaysOnlineResourceWithRawResponse: - return AsyncAlwaysOnlineResourceWithRawResponse(self._settings.always_online) - - @cached_property - def always_use_https(self) -> AsyncAlwaysUseHTTPSResourceWithRawResponse: - return AsyncAlwaysUseHTTPSResourceWithRawResponse(self._settings.always_use_https) - - @cached_property - def automatic_https_rewrites(self) -> AsyncAutomaticHTTPSRewritesResourceWithRawResponse: - return AsyncAutomaticHTTPSRewritesResourceWithRawResponse(self._settings.automatic_https_rewrites) - - @cached_property - def automatic_platform_optimization(self) -> AsyncAutomaticPlatformOptimizationResourceWithRawResponse: - return AsyncAutomaticPlatformOptimizationResourceWithRawResponse(self._settings.automatic_platform_optimization) - - @cached_property - def brotli(self) -> AsyncBrotliResourceWithRawResponse: - return AsyncBrotliResourceWithRawResponse(self._settings.brotli) - - @cached_property - def browser_cache_ttl(self) -> AsyncBrowserCacheTTLResourceWithRawResponse: - return AsyncBrowserCacheTTLResourceWithRawResponse(self._settings.browser_cache_ttl) - - @cached_property - def browser_check(self) -> AsyncBrowserCheckResourceWithRawResponse: - return AsyncBrowserCheckResourceWithRawResponse(self._settings.browser_check) - - @cached_property - def cache_level(self) -> AsyncCacheLevelResourceWithRawResponse: - return AsyncCacheLevelResourceWithRawResponse(self._settings.cache_level) - - @cached_property - def challenge_ttl(self) -> AsyncChallengeTTLResourceWithRawResponse: - return AsyncChallengeTTLResourceWithRawResponse(self._settings.challenge_ttl) - - @cached_property - def ciphers(self) -> AsyncCiphersResourceWithRawResponse: - return AsyncCiphersResourceWithRawResponse(self._settings.ciphers) - - @cached_property - def development_mode(self) -> AsyncDevelopmentModeResourceWithRawResponse: - return AsyncDevelopmentModeResourceWithRawResponse(self._settings.development_mode) - - @cached_property - def early_hints(self) -> AsyncEarlyHintsResourceWithRawResponse: - return AsyncEarlyHintsResourceWithRawResponse(self._settings.early_hints) - - @cached_property - def email_obfuscation(self) -> AsyncEmailObfuscationResourceWithRawResponse: - return AsyncEmailObfuscationResourceWithRawResponse(self._settings.email_obfuscation) - - @cached_property - def h2_prioritization(self) -> AsyncH2PrioritizationResourceWithRawResponse: - return AsyncH2PrioritizationResourceWithRawResponse(self._settings.h2_prioritization) - - @cached_property - def hotlink_protection(self) -> AsyncHotlinkProtectionResourceWithRawResponse: - return AsyncHotlinkProtectionResourceWithRawResponse(self._settings.hotlink_protection) - - @cached_property - def http2(self) -> AsyncHTTP2ResourceWithRawResponse: - return AsyncHTTP2ResourceWithRawResponse(self._settings.http2) - - @cached_property - def http3(self) -> AsyncHTTP3ResourceWithRawResponse: - return AsyncHTTP3ResourceWithRawResponse(self._settings.http3) - - @cached_property - def image_resizing(self) -> AsyncImageResizingResourceWithRawResponse: - return AsyncImageResizingResourceWithRawResponse(self._settings.image_resizing) - - @cached_property - def ip_geolocation(self) -> AsyncIPGeolocationResourceWithRawResponse: - return AsyncIPGeolocationResourceWithRawResponse(self._settings.ip_geolocation) - - @cached_property - def ipv6(self) -> AsyncIPV6ResourceWithRawResponse: - return AsyncIPV6ResourceWithRawResponse(self._settings.ipv6) - - @cached_property - def min_tls_version(self) -> AsyncMinTLSVersionResourceWithRawResponse: - return AsyncMinTLSVersionResourceWithRawResponse(self._settings.min_tls_version) - - @cached_property - def minify(self) -> AsyncMinifyResourceWithRawResponse: - return AsyncMinifyResourceWithRawResponse(self._settings.minify) - - @cached_property - def mirage(self) -> AsyncMirageResourceWithRawResponse: - return AsyncMirageResourceWithRawResponse(self._settings.mirage) - - @cached_property - def mobile_redirect(self) -> AsyncMobileRedirectResourceWithRawResponse: - return AsyncMobileRedirectResourceWithRawResponse(self._settings.mobile_redirect) - - @cached_property - def nel(self) -> AsyncNELResourceWithRawResponse: - return AsyncNELResourceWithRawResponse(self._settings.nel) - - @cached_property - def opportunistic_encryption(self) -> AsyncOpportunisticEncryptionResourceWithRawResponse: - return AsyncOpportunisticEncryptionResourceWithRawResponse(self._settings.opportunistic_encryption) - - @cached_property - def opportunistic_onion(self) -> AsyncOpportunisticOnionResourceWithRawResponse: - return AsyncOpportunisticOnionResourceWithRawResponse(self._settings.opportunistic_onion) - - @cached_property - def orange_to_orange(self) -> AsyncOrangeToOrangeResourceWithRawResponse: - return AsyncOrangeToOrangeResourceWithRawResponse(self._settings.orange_to_orange) - - @cached_property - def origin_error_page_pass_thru(self) -> AsyncOriginErrorPagePassThruResourceWithRawResponse: - return AsyncOriginErrorPagePassThruResourceWithRawResponse(self._settings.origin_error_page_pass_thru) - - @cached_property - def origin_max_http_version(self) -> AsyncOriginMaxHTTPVersionResourceWithRawResponse: - return AsyncOriginMaxHTTPVersionResourceWithRawResponse(self._settings.origin_max_http_version) - - @cached_property - def polish(self) -> AsyncPolishResourceWithRawResponse: - return AsyncPolishResourceWithRawResponse(self._settings.polish) - - @cached_property - def prefetch_preload(self) -> AsyncPrefetchPreloadResourceWithRawResponse: - return AsyncPrefetchPreloadResourceWithRawResponse(self._settings.prefetch_preload) - - @cached_property - def proxy_read_timeout(self) -> AsyncProxyReadTimeoutResourceWithRawResponse: - return AsyncProxyReadTimeoutResourceWithRawResponse(self._settings.proxy_read_timeout) - - @cached_property - def pseudo_ipv4(self) -> AsyncPseudoIPV4ResourceWithRawResponse: - return AsyncPseudoIPV4ResourceWithRawResponse(self._settings.pseudo_ipv4) - - @cached_property - def response_buffering(self) -> AsyncResponseBufferingResourceWithRawResponse: - return AsyncResponseBufferingResourceWithRawResponse(self._settings.response_buffering) - - @cached_property - def rocket_loader(self) -> AsyncRocketLoaderResourceWithRawResponse: - return AsyncRocketLoaderResourceWithRawResponse(self._settings.rocket_loader) - - @cached_property - def security_headers(self) -> AsyncSecurityHeadersResourceWithRawResponse: - return AsyncSecurityHeadersResourceWithRawResponse(self._settings.security_headers) - - @cached_property - def security_level(self) -> AsyncSecurityLevelResourceWithRawResponse: - return AsyncSecurityLevelResourceWithRawResponse(self._settings.security_level) - - @cached_property - def server_side_excludes(self) -> AsyncServerSideExcludesResourceWithRawResponse: - return AsyncServerSideExcludesResourceWithRawResponse(self._settings.server_side_excludes) - - @cached_property - def sort_query_string_for_cache(self) -> AsyncSortQueryStringForCacheResourceWithRawResponse: - return AsyncSortQueryStringForCacheResourceWithRawResponse(self._settings.sort_query_string_for_cache) - - @cached_property - def ssl(self) -> AsyncSSLResourceWithRawResponse: - return AsyncSSLResourceWithRawResponse(self._settings.ssl) - - @cached_property - def ssl_recommender(self) -> AsyncSSLRecommenderResourceWithRawResponse: - return AsyncSSLRecommenderResourceWithRawResponse(self._settings.ssl_recommender) - - @cached_property - def tls_1_3(self) -> AsyncTLS1_3ResourceWithRawResponse: - return AsyncTLS1_3ResourceWithRawResponse(self._settings.tls_1_3) - - @cached_property - def tls_client_auth(self) -> AsyncTLSClientAuthResourceWithRawResponse: - return AsyncTLSClientAuthResourceWithRawResponse(self._settings.tls_client_auth) - - @cached_property - def true_client_ip_header(self) -> AsyncTrueClientIPHeaderResourceWithRawResponse: - return AsyncTrueClientIPHeaderResourceWithRawResponse(self._settings.true_client_ip_header) - - @cached_property - def waf(self) -> AsyncWAFResourceWithRawResponse: - return AsyncWAFResourceWithRawResponse(self._settings.waf) - - @cached_property - def webp(self) -> AsyncWebPResourceWithRawResponse: - return AsyncWebPResourceWithRawResponse(self._settings.webp) - - @cached_property - def websocket(self) -> AsyncWebsocketResourceWithRawResponse: - return AsyncWebsocketResourceWithRawResponse(self._settings.websocket) - - @cached_property - def font_settings(self) -> AsyncFontSettingsResourceWithRawResponse: - return AsyncFontSettingsResourceWithRawResponse(self._settings.font_settings) - - -class SettingsResourceWithStreamingResponse: - def __init__(self, settings: SettingsResource) -> None: - self._settings = settings - - @cached_property - def zero_rtt(self) -> ZeroRTTResourceWithStreamingResponse: - return ZeroRTTResourceWithStreamingResponse(self._settings.zero_rtt) - - @cached_property - def advanced_ddos(self) -> AdvancedDDoSResourceWithStreamingResponse: - return AdvancedDDoSResourceWithStreamingResponse(self._settings.advanced_ddos) - - @cached_property - def always_online(self) -> AlwaysOnlineResourceWithStreamingResponse: - return AlwaysOnlineResourceWithStreamingResponse(self._settings.always_online) - - @cached_property - def always_use_https(self) -> AlwaysUseHTTPSResourceWithStreamingResponse: - return AlwaysUseHTTPSResourceWithStreamingResponse(self._settings.always_use_https) - - @cached_property - def automatic_https_rewrites(self) -> AutomaticHTTPSRewritesResourceWithStreamingResponse: - return AutomaticHTTPSRewritesResourceWithStreamingResponse(self._settings.automatic_https_rewrites) - - @cached_property - def automatic_platform_optimization(self) -> AutomaticPlatformOptimizationResourceWithStreamingResponse: - return AutomaticPlatformOptimizationResourceWithStreamingResponse( - self._settings.automatic_platform_optimization - ) - - @cached_property - def brotli(self) -> BrotliResourceWithStreamingResponse: - return BrotliResourceWithStreamingResponse(self._settings.brotli) - - @cached_property - def browser_cache_ttl(self) -> BrowserCacheTTLResourceWithStreamingResponse: - return BrowserCacheTTLResourceWithStreamingResponse(self._settings.browser_cache_ttl) - - @cached_property - def browser_check(self) -> BrowserCheckResourceWithStreamingResponse: - return BrowserCheckResourceWithStreamingResponse(self._settings.browser_check) - - @cached_property - def cache_level(self) -> CacheLevelResourceWithStreamingResponse: - return CacheLevelResourceWithStreamingResponse(self._settings.cache_level) - - @cached_property - def challenge_ttl(self) -> ChallengeTTLResourceWithStreamingResponse: - return ChallengeTTLResourceWithStreamingResponse(self._settings.challenge_ttl) - - @cached_property - def ciphers(self) -> CiphersResourceWithStreamingResponse: - return CiphersResourceWithStreamingResponse(self._settings.ciphers) - - @cached_property - def development_mode(self) -> DevelopmentModeResourceWithStreamingResponse: - return DevelopmentModeResourceWithStreamingResponse(self._settings.development_mode) - - @cached_property - def early_hints(self) -> EarlyHintsResourceWithStreamingResponse: - return EarlyHintsResourceWithStreamingResponse(self._settings.early_hints) - - @cached_property - def email_obfuscation(self) -> EmailObfuscationResourceWithStreamingResponse: - return EmailObfuscationResourceWithStreamingResponse(self._settings.email_obfuscation) - - @cached_property - def h2_prioritization(self) -> H2PrioritizationResourceWithStreamingResponse: - return H2PrioritizationResourceWithStreamingResponse(self._settings.h2_prioritization) - - @cached_property - def hotlink_protection(self) -> HotlinkProtectionResourceWithStreamingResponse: - return HotlinkProtectionResourceWithStreamingResponse(self._settings.hotlink_protection) - - @cached_property - def http2(self) -> HTTP2ResourceWithStreamingResponse: - return HTTP2ResourceWithStreamingResponse(self._settings.http2) - - @cached_property - def http3(self) -> HTTP3ResourceWithStreamingResponse: - return HTTP3ResourceWithStreamingResponse(self._settings.http3) - - @cached_property - def image_resizing(self) -> ImageResizingResourceWithStreamingResponse: - return ImageResizingResourceWithStreamingResponse(self._settings.image_resizing) - - @cached_property - def ip_geolocation(self) -> IPGeolocationResourceWithStreamingResponse: - return IPGeolocationResourceWithStreamingResponse(self._settings.ip_geolocation) - - @cached_property - def ipv6(self) -> IPV6ResourceWithStreamingResponse: - return IPV6ResourceWithStreamingResponse(self._settings.ipv6) - - @cached_property - def min_tls_version(self) -> MinTLSVersionResourceWithStreamingResponse: - return MinTLSVersionResourceWithStreamingResponse(self._settings.min_tls_version) - - @cached_property - def minify(self) -> MinifyResourceWithStreamingResponse: - return MinifyResourceWithStreamingResponse(self._settings.minify) - - @cached_property - def mirage(self) -> MirageResourceWithStreamingResponse: - return MirageResourceWithStreamingResponse(self._settings.mirage) - - @cached_property - def mobile_redirect(self) -> MobileRedirectResourceWithStreamingResponse: - return MobileRedirectResourceWithStreamingResponse(self._settings.mobile_redirect) - - @cached_property - def nel(self) -> NELResourceWithStreamingResponse: - return NELResourceWithStreamingResponse(self._settings.nel) - - @cached_property - def opportunistic_encryption(self) -> OpportunisticEncryptionResourceWithStreamingResponse: - return OpportunisticEncryptionResourceWithStreamingResponse(self._settings.opportunistic_encryption) - - @cached_property - def opportunistic_onion(self) -> OpportunisticOnionResourceWithStreamingResponse: - return OpportunisticOnionResourceWithStreamingResponse(self._settings.opportunistic_onion) - - @cached_property - def orange_to_orange(self) -> OrangeToOrangeResourceWithStreamingResponse: - return OrangeToOrangeResourceWithStreamingResponse(self._settings.orange_to_orange) - - @cached_property - def origin_error_page_pass_thru(self) -> OriginErrorPagePassThruResourceWithStreamingResponse: - return OriginErrorPagePassThruResourceWithStreamingResponse(self._settings.origin_error_page_pass_thru) - - @cached_property - def origin_max_http_version(self) -> OriginMaxHTTPVersionResourceWithStreamingResponse: - return OriginMaxHTTPVersionResourceWithStreamingResponse(self._settings.origin_max_http_version) - - @cached_property - def polish(self) -> PolishResourceWithStreamingResponse: - return PolishResourceWithStreamingResponse(self._settings.polish) - - @cached_property - def prefetch_preload(self) -> PrefetchPreloadResourceWithStreamingResponse: - return PrefetchPreloadResourceWithStreamingResponse(self._settings.prefetch_preload) - - @cached_property - def proxy_read_timeout(self) -> ProxyReadTimeoutResourceWithStreamingResponse: - return ProxyReadTimeoutResourceWithStreamingResponse(self._settings.proxy_read_timeout) - - @cached_property - def pseudo_ipv4(self) -> PseudoIPV4ResourceWithStreamingResponse: - return PseudoIPV4ResourceWithStreamingResponse(self._settings.pseudo_ipv4) - - @cached_property - def response_buffering(self) -> ResponseBufferingResourceWithStreamingResponse: - return ResponseBufferingResourceWithStreamingResponse(self._settings.response_buffering) - - @cached_property - def rocket_loader(self) -> RocketLoaderResourceWithStreamingResponse: - return RocketLoaderResourceWithStreamingResponse(self._settings.rocket_loader) - - @cached_property - def security_headers(self) -> SecurityHeadersResourceWithStreamingResponse: - return SecurityHeadersResourceWithStreamingResponse(self._settings.security_headers) - - @cached_property - def security_level(self) -> SecurityLevelResourceWithStreamingResponse: - return SecurityLevelResourceWithStreamingResponse(self._settings.security_level) - - @cached_property - def server_side_excludes(self) -> ServerSideExcludesResourceWithStreamingResponse: - return ServerSideExcludesResourceWithStreamingResponse(self._settings.server_side_excludes) - - @cached_property - def sort_query_string_for_cache(self) -> SortQueryStringForCacheResourceWithStreamingResponse: - return SortQueryStringForCacheResourceWithStreamingResponse(self._settings.sort_query_string_for_cache) - - @cached_property - def ssl(self) -> SSLResourceWithStreamingResponse: - return SSLResourceWithStreamingResponse(self._settings.ssl) - - @cached_property - def ssl_recommender(self) -> SSLRecommenderResourceWithStreamingResponse: - return SSLRecommenderResourceWithStreamingResponse(self._settings.ssl_recommender) - - @cached_property - def tls_1_3(self) -> TLS1_3ResourceWithStreamingResponse: - return TLS1_3ResourceWithStreamingResponse(self._settings.tls_1_3) - - @cached_property - def tls_client_auth(self) -> TLSClientAuthResourceWithStreamingResponse: - return TLSClientAuthResourceWithStreamingResponse(self._settings.tls_client_auth) - - @cached_property - def true_client_ip_header(self) -> TrueClientIPHeaderResourceWithStreamingResponse: - return TrueClientIPHeaderResourceWithStreamingResponse(self._settings.true_client_ip_header) - - @cached_property - def waf(self) -> WAFResourceWithStreamingResponse: - return WAFResourceWithStreamingResponse(self._settings.waf) - - @cached_property - def webp(self) -> WebPResourceWithStreamingResponse: - return WebPResourceWithStreamingResponse(self._settings.webp) - - @cached_property - def websocket(self) -> WebsocketResourceWithStreamingResponse: - return WebsocketResourceWithStreamingResponse(self._settings.websocket) - - @cached_property - def font_settings(self) -> FontSettingsResourceWithStreamingResponse: - return FontSettingsResourceWithStreamingResponse(self._settings.font_settings) - - -class AsyncSettingsResourceWithStreamingResponse: - def __init__(self, settings: AsyncSettingsResource) -> None: - self._settings = settings - - @cached_property - def zero_rtt(self) -> AsyncZeroRTTResourceWithStreamingResponse: - return AsyncZeroRTTResourceWithStreamingResponse(self._settings.zero_rtt) - - @cached_property - def advanced_ddos(self) -> AsyncAdvancedDDoSResourceWithStreamingResponse: - return AsyncAdvancedDDoSResourceWithStreamingResponse(self._settings.advanced_ddos) - - @cached_property - def always_online(self) -> AsyncAlwaysOnlineResourceWithStreamingResponse: - return AsyncAlwaysOnlineResourceWithStreamingResponse(self._settings.always_online) - - @cached_property - def always_use_https(self) -> AsyncAlwaysUseHTTPSResourceWithStreamingResponse: - return AsyncAlwaysUseHTTPSResourceWithStreamingResponse(self._settings.always_use_https) - - @cached_property - def automatic_https_rewrites(self) -> AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse: - return AsyncAutomaticHTTPSRewritesResourceWithStreamingResponse(self._settings.automatic_https_rewrites) - - @cached_property - def automatic_platform_optimization(self) -> AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse: - return AsyncAutomaticPlatformOptimizationResourceWithStreamingResponse( - self._settings.automatic_platform_optimization - ) - - @cached_property - def brotli(self) -> AsyncBrotliResourceWithStreamingResponse: - return AsyncBrotliResourceWithStreamingResponse(self._settings.brotli) - - @cached_property - def browser_cache_ttl(self) -> AsyncBrowserCacheTTLResourceWithStreamingResponse: - return AsyncBrowserCacheTTLResourceWithStreamingResponse(self._settings.browser_cache_ttl) - - @cached_property - def browser_check(self) -> AsyncBrowserCheckResourceWithStreamingResponse: - return AsyncBrowserCheckResourceWithStreamingResponse(self._settings.browser_check) - - @cached_property - def cache_level(self) -> AsyncCacheLevelResourceWithStreamingResponse: - return AsyncCacheLevelResourceWithStreamingResponse(self._settings.cache_level) - - @cached_property - def challenge_ttl(self) -> AsyncChallengeTTLResourceWithStreamingResponse: - return AsyncChallengeTTLResourceWithStreamingResponse(self._settings.challenge_ttl) - - @cached_property - def ciphers(self) -> AsyncCiphersResourceWithStreamingResponse: - return AsyncCiphersResourceWithStreamingResponse(self._settings.ciphers) - - @cached_property - def development_mode(self) -> AsyncDevelopmentModeResourceWithStreamingResponse: - return AsyncDevelopmentModeResourceWithStreamingResponse(self._settings.development_mode) - - @cached_property - def early_hints(self) -> AsyncEarlyHintsResourceWithStreamingResponse: - return AsyncEarlyHintsResourceWithStreamingResponse(self._settings.early_hints) - - @cached_property - def email_obfuscation(self) -> AsyncEmailObfuscationResourceWithStreamingResponse: - return AsyncEmailObfuscationResourceWithStreamingResponse(self._settings.email_obfuscation) - - @cached_property - def h2_prioritization(self) -> AsyncH2PrioritizationResourceWithStreamingResponse: - return AsyncH2PrioritizationResourceWithStreamingResponse(self._settings.h2_prioritization) - - @cached_property - def hotlink_protection(self) -> AsyncHotlinkProtectionResourceWithStreamingResponse: - return AsyncHotlinkProtectionResourceWithStreamingResponse(self._settings.hotlink_protection) - - @cached_property - def http2(self) -> AsyncHTTP2ResourceWithStreamingResponse: - return AsyncHTTP2ResourceWithStreamingResponse(self._settings.http2) - - @cached_property - def http3(self) -> AsyncHTTP3ResourceWithStreamingResponse: - return AsyncHTTP3ResourceWithStreamingResponse(self._settings.http3) - - @cached_property - def image_resizing(self) -> AsyncImageResizingResourceWithStreamingResponse: - return AsyncImageResizingResourceWithStreamingResponse(self._settings.image_resizing) - - @cached_property - def ip_geolocation(self) -> AsyncIPGeolocationResourceWithStreamingResponse: - return AsyncIPGeolocationResourceWithStreamingResponse(self._settings.ip_geolocation) - - @cached_property - def ipv6(self) -> AsyncIPV6ResourceWithStreamingResponse: - return AsyncIPV6ResourceWithStreamingResponse(self._settings.ipv6) - - @cached_property - def min_tls_version(self) -> AsyncMinTLSVersionResourceWithStreamingResponse: - return AsyncMinTLSVersionResourceWithStreamingResponse(self._settings.min_tls_version) - - @cached_property - def minify(self) -> AsyncMinifyResourceWithStreamingResponse: - return AsyncMinifyResourceWithStreamingResponse(self._settings.minify) - - @cached_property - def mirage(self) -> AsyncMirageResourceWithStreamingResponse: - return AsyncMirageResourceWithStreamingResponse(self._settings.mirage) - - @cached_property - def mobile_redirect(self) -> AsyncMobileRedirectResourceWithStreamingResponse: - return AsyncMobileRedirectResourceWithStreamingResponse(self._settings.mobile_redirect) - - @cached_property - def nel(self) -> AsyncNELResourceWithStreamingResponse: - return AsyncNELResourceWithStreamingResponse(self._settings.nel) - - @cached_property - def opportunistic_encryption(self) -> AsyncOpportunisticEncryptionResourceWithStreamingResponse: - return AsyncOpportunisticEncryptionResourceWithStreamingResponse(self._settings.opportunistic_encryption) - - @cached_property - def opportunistic_onion(self) -> AsyncOpportunisticOnionResourceWithStreamingResponse: - return AsyncOpportunisticOnionResourceWithStreamingResponse(self._settings.opportunistic_onion) - - @cached_property - def orange_to_orange(self) -> AsyncOrangeToOrangeResourceWithStreamingResponse: - return AsyncOrangeToOrangeResourceWithStreamingResponse(self._settings.orange_to_orange) - - @cached_property - def origin_error_page_pass_thru(self) -> AsyncOriginErrorPagePassThruResourceWithStreamingResponse: - return AsyncOriginErrorPagePassThruResourceWithStreamingResponse(self._settings.origin_error_page_pass_thru) +class AsyncSettingsResourceWithStreamingResponse: + def __init__(self, settings: AsyncSettingsResource) -> None: + self._settings = settings @cached_property def origin_max_http_version(self) -> AsyncOriginMaxHTTPVersionResourceWithStreamingResponse: return AsyncOriginMaxHTTPVersionResourceWithStreamingResponse(self._settings.origin_max_http_version) - @cached_property - def polish(self) -> AsyncPolishResourceWithStreamingResponse: - return AsyncPolishResourceWithStreamingResponse(self._settings.polish) - - @cached_property - def prefetch_preload(self) -> AsyncPrefetchPreloadResourceWithStreamingResponse: - return AsyncPrefetchPreloadResourceWithStreamingResponse(self._settings.prefetch_preload) - - @cached_property - def proxy_read_timeout(self) -> AsyncProxyReadTimeoutResourceWithStreamingResponse: - return AsyncProxyReadTimeoutResourceWithStreamingResponse(self._settings.proxy_read_timeout) - - @cached_property - def pseudo_ipv4(self) -> AsyncPseudoIPV4ResourceWithStreamingResponse: - return AsyncPseudoIPV4ResourceWithStreamingResponse(self._settings.pseudo_ipv4) - - @cached_property - def response_buffering(self) -> AsyncResponseBufferingResourceWithStreamingResponse: - return AsyncResponseBufferingResourceWithStreamingResponse(self._settings.response_buffering) - - @cached_property - def rocket_loader(self) -> AsyncRocketLoaderResourceWithStreamingResponse: - return AsyncRocketLoaderResourceWithStreamingResponse(self._settings.rocket_loader) - - @cached_property - def security_headers(self) -> AsyncSecurityHeadersResourceWithStreamingResponse: - return AsyncSecurityHeadersResourceWithStreamingResponse(self._settings.security_headers) - - @cached_property - def security_level(self) -> AsyncSecurityLevelResourceWithStreamingResponse: - return AsyncSecurityLevelResourceWithStreamingResponse(self._settings.security_level) - - @cached_property - def server_side_excludes(self) -> AsyncServerSideExcludesResourceWithStreamingResponse: - return AsyncServerSideExcludesResourceWithStreamingResponse(self._settings.server_side_excludes) - - @cached_property - def sort_query_string_for_cache(self) -> AsyncSortQueryStringForCacheResourceWithStreamingResponse: - return AsyncSortQueryStringForCacheResourceWithStreamingResponse(self._settings.sort_query_string_for_cache) - - @cached_property - def ssl(self) -> AsyncSSLResourceWithStreamingResponse: - return AsyncSSLResourceWithStreamingResponse(self._settings.ssl) - - @cached_property - def ssl_recommender(self) -> AsyncSSLRecommenderResourceWithStreamingResponse: - return AsyncSSLRecommenderResourceWithStreamingResponse(self._settings.ssl_recommender) - - @cached_property - def tls_1_3(self) -> AsyncTLS1_3ResourceWithStreamingResponse: - return AsyncTLS1_3ResourceWithStreamingResponse(self._settings.tls_1_3) - - @cached_property - def tls_client_auth(self) -> AsyncTLSClientAuthResourceWithStreamingResponse: - return AsyncTLSClientAuthResourceWithStreamingResponse(self._settings.tls_client_auth) - - @cached_property - def true_client_ip_header(self) -> AsyncTrueClientIPHeaderResourceWithStreamingResponse: - return AsyncTrueClientIPHeaderResourceWithStreamingResponse(self._settings.true_client_ip_header) - - @cached_property - def waf(self) -> AsyncWAFResourceWithStreamingResponse: - return AsyncWAFResourceWithStreamingResponse(self._settings.waf) - - @cached_property - def webp(self) -> AsyncWebPResourceWithStreamingResponse: - return AsyncWebPResourceWithStreamingResponse(self._settings.webp) - - @cached_property - def websocket(self) -> AsyncWebsocketResourceWithStreamingResponse: - return AsyncWebsocketResourceWithStreamingResponse(self._settings.websocket) - @cached_property def font_settings(self) -> AsyncFontSettingsResourceWithStreamingResponse: return AsyncFontSettingsResourceWithStreamingResponse(self._settings.font_settings) diff --git a/src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py b/src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py deleted file mode 100644 index 8ac6a3306fa..00000000000 --- a/src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py +++ /dev/null @@ -1,274 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import sort_query_string_for_cache_edit_params -from ....types.zones.settings.sort_query_string_for_cache import SortQueryStringForCache - -__all__ = ["SortQueryStringForCacheResource", "AsyncSortQueryStringForCacheResource"] - - -class SortQueryStringForCacheResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> SortQueryStringForCacheResourceWithRawResponse: - return SortQueryStringForCacheResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> SortQueryStringForCacheResourceWithStreamingResponse: - return SortQueryStringForCacheResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SortQueryStringForCache]: - """ - Cloudflare will treat files with the same query strings as the same file in - cache, regardless of the order of the query strings. This is limited to - Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/sort_query_string_for_cache", - body=maybe_transform( - {"value": value}, sort_query_string_for_cache_edit_params.SortQueryStringForCacheEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SortQueryStringForCache]]._unwrapper, - ), - cast_to=cast(Type[Optional[SortQueryStringForCache]], ResultWrapper[SortQueryStringForCache]), - ) - - def get( - self, - *, - zone_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[SortQueryStringForCache]: - """ - Cloudflare will treat files with the same query strings as the same file in - cache, regardless of the order of the query strings. This is limited to - Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/sort_query_string_for_cache", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SortQueryStringForCache]]._unwrapper, - ), - cast_to=cast(Type[Optional[SortQueryStringForCache]], ResultWrapper[SortQueryStringForCache]), - ) - - -class AsyncSortQueryStringForCacheResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncSortQueryStringForCacheResourceWithRawResponse: - return AsyncSortQueryStringForCacheResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSortQueryStringForCacheResourceWithStreamingResponse: - return AsyncSortQueryStringForCacheResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SortQueryStringForCache]: - """ - Cloudflare will treat files with the same query strings as the same file in - cache, regardless of the order of the query strings. This is limited to - Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/sort_query_string_for_cache", - body=await async_maybe_transform( - {"value": value}, sort_query_string_for_cache_edit_params.SortQueryStringForCacheEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SortQueryStringForCache]]._unwrapper, - ), - cast_to=cast(Type[Optional[SortQueryStringForCache]], ResultWrapper[SortQueryStringForCache]), - ) - - async def get( - self, - *, - zone_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[SortQueryStringForCache]: - """ - Cloudflare will treat files with the same query strings as the same file in - cache, regardless of the order of the query strings. This is limited to - Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/sort_query_string_for_cache", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SortQueryStringForCache]]._unwrapper, - ), - cast_to=cast(Type[Optional[SortQueryStringForCache]], ResultWrapper[SortQueryStringForCache]), - ) - - -class SortQueryStringForCacheResourceWithRawResponse: - def __init__(self, sort_query_string_for_cache: SortQueryStringForCacheResource) -> None: - self._sort_query_string_for_cache = sort_query_string_for_cache - - self.edit = to_raw_response_wrapper( - sort_query_string_for_cache.edit, - ) - self.get = to_raw_response_wrapper( - sort_query_string_for_cache.get, - ) - - -class AsyncSortQueryStringForCacheResourceWithRawResponse: - def __init__(self, sort_query_string_for_cache: AsyncSortQueryStringForCacheResource) -> None: - self._sort_query_string_for_cache = sort_query_string_for_cache - - self.edit = async_to_raw_response_wrapper( - sort_query_string_for_cache.edit, - ) - self.get = async_to_raw_response_wrapper( - sort_query_string_for_cache.get, - ) - - -class SortQueryStringForCacheResourceWithStreamingResponse: - def __init__(self, sort_query_string_for_cache: SortQueryStringForCacheResource) -> None: - self._sort_query_string_for_cache = sort_query_string_for_cache - - self.edit = to_streamed_response_wrapper( - sort_query_string_for_cache.edit, - ) - self.get = to_streamed_response_wrapper( - sort_query_string_for_cache.get, - ) - - -class AsyncSortQueryStringForCacheResourceWithStreamingResponse: - def __init__(self, sort_query_string_for_cache: AsyncSortQueryStringForCacheResource) -> None: - self._sort_query_string_for_cache = sort_query_string_for_cache - - self.edit = async_to_streamed_response_wrapper( - sort_query_string_for_cache.edit, - ) - self.get = async_to_streamed_response_wrapper( - sort_query_string_for_cache.get, - ) diff --git a/src/cloudflare/resources/zones/settings/ssl.py b/src/cloudflare/resources/zones/settings/ssl.py deleted file mode 100644 index c04dd0ce79a..00000000000 --- a/src/cloudflare/resources/zones/settings/ssl.py +++ /dev/null @@ -1,322 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import ssl_edit_params -from ....types.zones.settings.ssl import SSL - -__all__ = ["SSLResource", "AsyncSSLResource"] - - -class SSLResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> SSLResourceWithRawResponse: - return SSLResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> SSLResourceWithStreamingResponse: - return SSLResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["off", "flexible", "full", "strict"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SSL]: - """ - SSL encrypts your visitor's connection and safeguards credit card numbers and - other personal data to and from your website. SSL can take up to 5 minutes to - fully activate. Requires Cloudflare active on your root domain or www domain. - Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare - and your web server (all HTTP traffic). Flexible: SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and - your web server. You don't need to have an SSL cert on your web server, but your - vistors will still see the site as being HTTPS enabled. Full: SSL between the - visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between - Cloudflare and your web server. You'll need to have your own SSL cert or - self-signed cert at the very least. Full (Strict): SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and - your web server. You'll need to have a valid SSL certificate installed on your - web server. This certificate must be signed by a certificate authority, have an - expiration date in the future, and respond for the request domain name - (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Depends on the zone's plan level - - 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}/settings/ssl", - body=maybe_transform({"value": value}, ssl_edit_params.SSLEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSL]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSL]], ResultWrapper[SSL]), - ) - - def get( - self, - *, - zone_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[SSL]: - """ - SSL encrypts your visitor's connection and safeguards credit card numbers and - other personal data to and from your website. SSL can take up to 5 minutes to - fully activate. Requires Cloudflare active on your root domain or www domain. - Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare - and your web server (all HTTP traffic). Flexible: SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and - your web server. You don't need to have an SSL cert on your web server, but your - vistors will still see the site as being HTTPS enabled. Full: SSL between the - visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between - Cloudflare and your web server. You'll need to have your own SSL cert or - self-signed cert at the very least. Full (Strict): SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and - your web server. You'll need to have a valid SSL certificate installed on your - web server. This certificate must be signed by a certificate authority, have an - expiration date in the future, and respond for the request domain name - (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/ssl", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSL]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSL]], ResultWrapper[SSL]), - ) - - -class AsyncSSLResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncSSLResourceWithRawResponse: - return AsyncSSLResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSSLResourceWithStreamingResponse: - return AsyncSSLResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["off", "flexible", "full", "strict"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SSL]: - """ - SSL encrypts your visitor's connection and safeguards credit card numbers and - other personal data to and from your website. SSL can take up to 5 minutes to - fully activate. Requires Cloudflare active on your root domain or www domain. - Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare - and your web server (all HTTP traffic). Flexible: SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and - your web server. You don't need to have an SSL cert on your web server, but your - vistors will still see the site as being HTTPS enabled. Full: SSL between the - visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between - Cloudflare and your web server. You'll need to have your own SSL cert or - self-signed cert at the very least. Full (Strict): SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and - your web server. You'll need to have a valid SSL certificate installed on your - web server. This certificate must be signed by a certificate authority, have an - expiration date in the future, and respond for the request domain name - (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Depends on the zone's plan level - - 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}/settings/ssl", - body=await async_maybe_transform({"value": value}, ssl_edit_params.SSLEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSL]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSL]], ResultWrapper[SSL]), - ) - - async def get( - self, - *, - zone_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[SSL]: - """ - SSL encrypts your visitor's connection and safeguards credit card numbers and - other personal data to and from your website. SSL can take up to 5 minutes to - fully activate. Requires Cloudflare active on your root domain or www domain. - Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare - and your web server (all HTTP traffic). Flexible: SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and - your web server. You don't need to have an SSL cert on your web server, but your - vistors will still see the site as being HTTPS enabled. Full: SSL between the - visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between - Cloudflare and your web server. You'll need to have your own SSL cert or - self-signed cert at the very least. Full (Strict): SSL between the visitor and - Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and - your web server. You'll need to have a valid SSL certificate installed on your - web server. This certificate must be signed by a certificate authority, have an - expiration date in the future, and respond for the request domain name - (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/ssl", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSL]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSL]], ResultWrapper[SSL]), - ) - - -class SSLResourceWithRawResponse: - def __init__(self, ssl: SSLResource) -> None: - self._ssl = ssl - - self.edit = to_raw_response_wrapper( - ssl.edit, - ) - self.get = to_raw_response_wrapper( - ssl.get, - ) - - -class AsyncSSLResourceWithRawResponse: - def __init__(self, ssl: AsyncSSLResource) -> None: - self._ssl = ssl - - self.edit = async_to_raw_response_wrapper( - ssl.edit, - ) - self.get = async_to_raw_response_wrapper( - ssl.get, - ) - - -class SSLResourceWithStreamingResponse: - def __init__(self, ssl: SSLResource) -> None: - self._ssl = ssl - - self.edit = to_streamed_response_wrapper( - ssl.edit, - ) - self.get = to_streamed_response_wrapper( - ssl.get, - ) - - -class AsyncSSLResourceWithStreamingResponse: - def __init__(self, ssl: AsyncSSLResource) -> None: - self._ssl = ssl - - self.edit = async_to_streamed_response_wrapper( - ssl.edit, - ) - self.get = async_to_streamed_response_wrapper( - ssl.get, - ) diff --git a/src/cloudflare/resources/zones/settings/ssl_recommender.py b/src/cloudflare/resources/zones/settings/ssl_recommender.py deleted file mode 100644 index 816dd22ade6..00000000000 --- a/src/cloudflare/resources/zones/settings/ssl_recommender.py +++ /dev/null @@ -1,274 +0,0 @@ -# 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 ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import SSLRecommender, ssl_recommender_edit_params -from ....types.zones.settings.ssl_recommender import SSLRecommender -from ....types.zones.settings.ssl_recommender_param import SSLRecommenderParam - -__all__ = ["SSLRecommenderResource", "AsyncSSLRecommenderResource"] - - -class SSLRecommenderResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> SSLRecommenderResourceWithRawResponse: - return SSLRecommenderResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> SSLRecommenderResourceWithStreamingResponse: - return SSLRecommenderResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: SSLRecommenderParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SSLRecommender]: - """ - Enrollment in the SSL/TLS Recommender service which tries to detect and - recommend (by sending periodic emails) the most secure SSL/TLS setting your - origin servers support. - - Args: - zone_id: Identifier - - value: Enrollment in the SSL/TLS Recommender service which tries to detect and - recommend (by sending periodic emails) the most secure SSL/TLS setting your - origin servers support. - - 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}/settings/ssl_recommender", - body=maybe_transform({"value": value}, ssl_recommender_edit_params.SSLRecommenderEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSLRecommender]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSLRecommender]], ResultWrapper[SSLRecommender]), - ) - - def get( - self, - *, - zone_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[SSLRecommender]: - """ - Enrollment in the SSL/TLS Recommender service which tries to detect and - recommend (by sending periodic emails) the most secure SSL/TLS setting your - origin servers support. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/ssl_recommender", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSLRecommender]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSLRecommender]], ResultWrapper[SSLRecommender]), - ) - - -class AsyncSSLRecommenderResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncSSLRecommenderResourceWithRawResponse: - return AsyncSSLRecommenderResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSSLRecommenderResourceWithStreamingResponse: - return AsyncSSLRecommenderResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: SSLRecommenderParam, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SSLRecommender]: - """ - Enrollment in the SSL/TLS Recommender service which tries to detect and - recommend (by sending periodic emails) the most secure SSL/TLS setting your - origin servers support. - - Args: - zone_id: Identifier - - value: Enrollment in the SSL/TLS Recommender service which tries to detect and - recommend (by sending periodic emails) the most secure SSL/TLS setting your - origin servers support. - - 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}/settings/ssl_recommender", - body=await async_maybe_transform({"value": value}, ssl_recommender_edit_params.SSLRecommenderEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSLRecommender]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSLRecommender]], ResultWrapper[SSLRecommender]), - ) - - async def get( - self, - *, - zone_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[SSLRecommender]: - """ - Enrollment in the SSL/TLS Recommender service which tries to detect and - recommend (by sending periodic emails) the most secure SSL/TLS setting your - origin servers support. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/ssl_recommender", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SSLRecommender]]._unwrapper, - ), - cast_to=cast(Type[Optional[SSLRecommender]], ResultWrapper[SSLRecommender]), - ) - - -class SSLRecommenderResourceWithRawResponse: - def __init__(self, ssl_recommender: SSLRecommenderResource) -> None: - self._ssl_recommender = ssl_recommender - - self.edit = to_raw_response_wrapper( - ssl_recommender.edit, - ) - self.get = to_raw_response_wrapper( - ssl_recommender.get, - ) - - -class AsyncSSLRecommenderResourceWithRawResponse: - def __init__(self, ssl_recommender: AsyncSSLRecommenderResource) -> None: - self._ssl_recommender = ssl_recommender - - self.edit = async_to_raw_response_wrapper( - ssl_recommender.edit, - ) - self.get = async_to_raw_response_wrapper( - ssl_recommender.get, - ) - - -class SSLRecommenderResourceWithStreamingResponse: - def __init__(self, ssl_recommender: SSLRecommenderResource) -> None: - self._ssl_recommender = ssl_recommender - - self.edit = to_streamed_response_wrapper( - ssl_recommender.edit, - ) - self.get = to_streamed_response_wrapper( - ssl_recommender.get, - ) - - -class AsyncSSLRecommenderResourceWithStreamingResponse: - def __init__(self, ssl_recommender: AsyncSSLRecommenderResource) -> None: - self._ssl_recommender = ssl_recommender - - self.edit = async_to_streamed_response_wrapper( - ssl_recommender.edit, - ) - self.get = async_to_streamed_response_wrapper( - ssl_recommender.get, - ) diff --git a/src/cloudflare/resources/zones/settings/tls_1_3.py b/src/cloudflare/resources/zones/settings/tls_1_3.py deleted file mode 100644 index 77eb21c1c48..00000000000 --- a/src/cloudflare/resources/zones/settings/tls_1_3.py +++ /dev/null @@ -1,264 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import tls_1_3_edit_params -from ....types.zones.settings.tls_1_3 import TLS1_3 - -__all__ = ["TLS1_3Resource", "AsyncTLS1_3Resource"] - - -class TLS1_3Resource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> TLS1_3ResourceWithRawResponse: - return TLS1_3ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> TLS1_3ResourceWithStreamingResponse: - return TLS1_3ResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off", "zrt"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[TLS1_3]: - """ - Changes TLS 1.3 setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/tls_1_3", - body=maybe_transform({"value": value}, tls_1_3_edit_params.TLS1_3EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLS1_3]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLS1_3]], ResultWrapper[TLS1_3]), - ) - - def get( - self, - *, - zone_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[TLS1_3]: - """ - Gets TLS 1.3 setting enabled for a zone. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/tls_1_3", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLS1_3]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLS1_3]], ResultWrapper[TLS1_3]), - ) - - -class AsyncTLS1_3Resource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncTLS1_3ResourceWithRawResponse: - return AsyncTLS1_3ResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncTLS1_3ResourceWithStreamingResponse: - return AsyncTLS1_3ResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off", "zrt"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[TLS1_3]: - """ - Changes TLS 1.3 setting. - - Args: - zone_id: Identifier - - value: Value of the zone setting. Notes: Default value depends on the zone's plan - level. - - 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}/settings/tls_1_3", - body=await async_maybe_transform({"value": value}, tls_1_3_edit_params.TLS1_3EditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLS1_3]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLS1_3]], ResultWrapper[TLS1_3]), - ) - - async def get( - self, - *, - zone_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[TLS1_3]: - """ - Gets TLS 1.3 setting enabled for a zone. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/tls_1_3", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLS1_3]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLS1_3]], ResultWrapper[TLS1_3]), - ) - - -class TLS1_3ResourceWithRawResponse: - def __init__(self, tls_1_3: TLS1_3Resource) -> None: - self._tls_1_3 = tls_1_3 - - self.edit = to_raw_response_wrapper( - tls_1_3.edit, - ) - self.get = to_raw_response_wrapper( - tls_1_3.get, - ) - - -class AsyncTLS1_3ResourceWithRawResponse: - def __init__(self, tls_1_3: AsyncTLS1_3Resource) -> None: - self._tls_1_3 = tls_1_3 - - self.edit = async_to_raw_response_wrapper( - tls_1_3.edit, - ) - self.get = async_to_raw_response_wrapper( - tls_1_3.get, - ) - - -class TLS1_3ResourceWithStreamingResponse: - def __init__(self, tls_1_3: TLS1_3Resource) -> None: - self._tls_1_3 = tls_1_3 - - self.edit = to_streamed_response_wrapper( - tls_1_3.edit, - ) - self.get = to_streamed_response_wrapper( - tls_1_3.get, - ) - - -class AsyncTLS1_3ResourceWithStreamingResponse: - def __init__(self, tls_1_3: AsyncTLS1_3Resource) -> None: - self._tls_1_3 = tls_1_3 - - self.edit = async_to_streamed_response_wrapper( - tls_1_3.edit, - ) - self.get = async_to_streamed_response_wrapper( - tls_1_3.get, - ) diff --git a/src/cloudflare/resources/zones/settings/tls_client_auth.py b/src/cloudflare/resources/zones/settings/tls_client_auth.py deleted file mode 100644 index f1f2646104e..00000000000 --- a/src/cloudflare/resources/zones/settings/tls_client_auth.py +++ /dev/null @@ -1,266 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import tls_client_auth_edit_params -from ....types.zones.settings.tls_client_auth import TLSClientAuth - -__all__ = ["TLSClientAuthResource", "AsyncTLSClientAuthResource"] - - -class TLSClientAuthResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> TLSClientAuthResourceWithRawResponse: - return TLSClientAuthResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> TLSClientAuthResourceWithStreamingResponse: - return TLSClientAuthResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[TLSClientAuth]: - """ - TLS Client Auth requires Cloudflare to connect to your origin server using a - client certificate (Enterprise Only). - - Args: - zone_id: Identifier - - value: value of the zone setting. - - 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}/settings/tls_client_auth", - body=maybe_transform({"value": value}, tls_client_auth_edit_params.TLSClientAuthEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLSClientAuth]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLSClientAuth]], ResultWrapper[TLSClientAuth]), - ) - - def get( - self, - *, - zone_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[TLSClientAuth]: - """ - TLS Client Auth requires Cloudflare to connect to your origin server using a - client certificate (Enterprise Only). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/tls_client_auth", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLSClientAuth]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLSClientAuth]], ResultWrapper[TLSClientAuth]), - ) - - -class AsyncTLSClientAuthResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncTLSClientAuthResourceWithRawResponse: - return AsyncTLSClientAuthResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncTLSClientAuthResourceWithStreamingResponse: - return AsyncTLSClientAuthResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[TLSClientAuth]: - """ - TLS Client Auth requires Cloudflare to connect to your origin server using a - client certificate (Enterprise Only). - - Args: - zone_id: Identifier - - value: value of the zone setting. - - 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}/settings/tls_client_auth", - body=await async_maybe_transform({"value": value}, tls_client_auth_edit_params.TLSClientAuthEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLSClientAuth]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLSClientAuth]], ResultWrapper[TLSClientAuth]), - ) - - async def get( - self, - *, - zone_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[TLSClientAuth]: - """ - TLS Client Auth requires Cloudflare to connect to your origin server using a - client certificate (Enterprise Only). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/tls_client_auth", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TLSClientAuth]]._unwrapper, - ), - cast_to=cast(Type[Optional[TLSClientAuth]], ResultWrapper[TLSClientAuth]), - ) - - -class TLSClientAuthResourceWithRawResponse: - def __init__(self, tls_client_auth: TLSClientAuthResource) -> None: - self._tls_client_auth = tls_client_auth - - self.edit = to_raw_response_wrapper( - tls_client_auth.edit, - ) - self.get = to_raw_response_wrapper( - tls_client_auth.get, - ) - - -class AsyncTLSClientAuthResourceWithRawResponse: - def __init__(self, tls_client_auth: AsyncTLSClientAuthResource) -> None: - self._tls_client_auth = tls_client_auth - - self.edit = async_to_raw_response_wrapper( - tls_client_auth.edit, - ) - self.get = async_to_raw_response_wrapper( - tls_client_auth.get, - ) - - -class TLSClientAuthResourceWithStreamingResponse: - def __init__(self, tls_client_auth: TLSClientAuthResource) -> None: - self._tls_client_auth = tls_client_auth - - self.edit = to_streamed_response_wrapper( - tls_client_auth.edit, - ) - self.get = to_streamed_response_wrapper( - tls_client_auth.get, - ) - - -class AsyncTLSClientAuthResourceWithStreamingResponse: - def __init__(self, tls_client_auth: AsyncTLSClientAuthResource) -> None: - self._tls_client_auth = tls_client_auth - - self.edit = async_to_streamed_response_wrapper( - tls_client_auth.edit, - ) - self.get = async_to_streamed_response_wrapper( - tls_client_auth.get, - ) diff --git a/src/cloudflare/resources/zones/settings/true_client_ip_header.py b/src/cloudflare/resources/zones/settings/true_client_ip_header.py deleted file mode 100644 index ebe9635793b..00000000000 --- a/src/cloudflare/resources/zones/settings/true_client_ip_header.py +++ /dev/null @@ -1,268 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import true_client_ip_header_edit_params -from ....types.zones.settings.true_client_ip_header import TrueClientIPHeader - -__all__ = ["TrueClientIPHeaderResource", "AsyncTrueClientIPHeaderResource"] - - -class TrueClientIPHeaderResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> TrueClientIPHeaderResourceWithRawResponse: - return TrueClientIPHeaderResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> TrueClientIPHeaderResourceWithStreamingResponse: - return TrueClientIPHeaderResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[TrueClientIPHeader]: - """ - Allows customer to continue to use True Client IP (Akamai feature) in the - headers we send to the origin. This is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/true_client_ip_header", - body=maybe_transform({"value": value}, true_client_ip_header_edit_params.TrueClientIPHeaderEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TrueClientIPHeader]]._unwrapper, - ), - cast_to=cast(Type[Optional[TrueClientIPHeader]], ResultWrapper[TrueClientIPHeader]), - ) - - def get( - self, - *, - zone_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[TrueClientIPHeader]: - """ - Allows customer to continue to use True Client IP (Akamai feature) in the - headers we send to the origin. This is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/true_client_ip_header", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TrueClientIPHeader]]._unwrapper, - ), - cast_to=cast(Type[Optional[TrueClientIPHeader]], ResultWrapper[TrueClientIPHeader]), - ) - - -class AsyncTrueClientIPHeaderResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncTrueClientIPHeaderResourceWithRawResponse: - return AsyncTrueClientIPHeaderResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncTrueClientIPHeaderResourceWithStreamingResponse: - return AsyncTrueClientIPHeaderResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[TrueClientIPHeader]: - """ - Allows customer to continue to use True Client IP (Akamai feature) in the - headers we send to the origin. This is limited to Enterprise Zones. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/true_client_ip_header", - body=await async_maybe_transform( - {"value": value}, true_client_ip_header_edit_params.TrueClientIPHeaderEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TrueClientIPHeader]]._unwrapper, - ), - cast_to=cast(Type[Optional[TrueClientIPHeader]], ResultWrapper[TrueClientIPHeader]), - ) - - async def get( - self, - *, - zone_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[TrueClientIPHeader]: - """ - Allows customer to continue to use True Client IP (Akamai feature) in the - headers we send to the origin. This is limited to Enterprise Zones. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/true_client_ip_header", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[TrueClientIPHeader]]._unwrapper, - ), - cast_to=cast(Type[Optional[TrueClientIPHeader]], ResultWrapper[TrueClientIPHeader]), - ) - - -class TrueClientIPHeaderResourceWithRawResponse: - def __init__(self, true_client_ip_header: TrueClientIPHeaderResource) -> None: - self._true_client_ip_header = true_client_ip_header - - self.edit = to_raw_response_wrapper( - true_client_ip_header.edit, - ) - self.get = to_raw_response_wrapper( - true_client_ip_header.get, - ) - - -class AsyncTrueClientIPHeaderResourceWithRawResponse: - def __init__(self, true_client_ip_header: AsyncTrueClientIPHeaderResource) -> None: - self._true_client_ip_header = true_client_ip_header - - self.edit = async_to_raw_response_wrapper( - true_client_ip_header.edit, - ) - self.get = async_to_raw_response_wrapper( - true_client_ip_header.get, - ) - - -class TrueClientIPHeaderResourceWithStreamingResponse: - def __init__(self, true_client_ip_header: TrueClientIPHeaderResource) -> None: - self._true_client_ip_header = true_client_ip_header - - self.edit = to_streamed_response_wrapper( - true_client_ip_header.edit, - ) - self.get = to_streamed_response_wrapper( - true_client_ip_header.get, - ) - - -class AsyncTrueClientIPHeaderResourceWithStreamingResponse: - def __init__(self, true_client_ip_header: AsyncTrueClientIPHeaderResource) -> None: - self._true_client_ip_header = true_client_ip_header - - self.edit = async_to_streamed_response_wrapper( - true_client_ip_header.edit, - ) - self.get = async_to_streamed_response_wrapper( - true_client_ip_header.get, - ) diff --git a/src/cloudflare/resources/zones/settings/waf.py b/src/cloudflare/resources/zones/settings/waf.py deleted file mode 100644 index 42ce04861e0..00000000000 --- a/src/cloudflare/resources/zones/settings/waf.py +++ /dev/null @@ -1,302 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import waf_edit_params -from ....types.zones.settings.waf import WAF - -__all__ = ["WAFResource", "AsyncWAFResource"] - - -class WAFResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> WAFResourceWithRawResponse: - return WAFResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> WAFResourceWithStreamingResponse: - return WAFResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[WAF]: - """The WAF examines HTTP requests to your website. - - It inspects both GET and POST - requests and applies rules to help filter out illegitimate traffic from - legitimate website visitors. The Cloudflare WAF inspects website addresses or - URLs to detect anything out of the ordinary. If the Cloudflare WAF determines - suspicious user behavior, then the WAF will 'challenge' the web visitor with a - page that asks them to submit a CAPTCHA successfully to continue their action. - If the challenge is failed, the action will be stopped. What this means is that - Cloudflare's WAF will block any traffic identified as illegitimate before it - reaches your origin web server. - (https://support.cloudflare.com/hc/en-us/articles/200172016). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/waf", - body=maybe_transform({"value": value}, waf_edit_params.WAFEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WAF]]._unwrapper, - ), - cast_to=cast(Type[Optional[WAF]], ResultWrapper[WAF]), - ) - - def get( - self, - *, - zone_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[WAF]: - """The WAF examines HTTP requests to your website. - - It inspects both GET and POST - requests and applies rules to help filter out illegitimate traffic from - legitimate website visitors. The Cloudflare WAF inspects website addresses or - URLs to detect anything out of the ordinary. If the Cloudflare WAF determines - suspicious user behavior, then the WAF will 'challenge' the web visitor with a - page that asks them to submit a CAPTCHA successfully to continue their action. - If the challenge is failed, the action will be stopped. What this means is that - Cloudflare's WAF will block any traffic identified as illegitimate before it - reaches your origin web server. - (https://support.cloudflare.com/hc/en-us/articles/200172016). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/waf", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WAF]]._unwrapper, - ), - cast_to=cast(Type[Optional[WAF]], ResultWrapper[WAF]), - ) - - -class AsyncWAFResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncWAFResourceWithRawResponse: - return AsyncWAFResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncWAFResourceWithStreamingResponse: - return AsyncWAFResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[WAF]: - """The WAF examines HTTP requests to your website. - - It inspects both GET and POST - requests and applies rules to help filter out illegitimate traffic from - legitimate website visitors. The Cloudflare WAF inspects website addresses or - URLs to detect anything out of the ordinary. If the Cloudflare WAF determines - suspicious user behavior, then the WAF will 'challenge' the web visitor with a - page that asks them to submit a CAPTCHA successfully to continue their action. - If the challenge is failed, the action will be stopped. What this means is that - Cloudflare's WAF will block any traffic identified as illegitimate before it - reaches your origin web server. - (https://support.cloudflare.com/hc/en-us/articles/200172016). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/waf", - body=await async_maybe_transform({"value": value}, waf_edit_params.WAFEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WAF]]._unwrapper, - ), - cast_to=cast(Type[Optional[WAF]], ResultWrapper[WAF]), - ) - - async def get( - self, - *, - zone_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[WAF]: - """The WAF examines HTTP requests to your website. - - It inspects both GET and POST - requests and applies rules to help filter out illegitimate traffic from - legitimate website visitors. The Cloudflare WAF inspects website addresses or - URLs to detect anything out of the ordinary. If the Cloudflare WAF determines - suspicious user behavior, then the WAF will 'challenge' the web visitor with a - page that asks them to submit a CAPTCHA successfully to continue their action. - If the challenge is failed, the action will be stopped. What this means is that - Cloudflare's WAF will block any traffic identified as illegitimate before it - reaches your origin web server. - (https://support.cloudflare.com/hc/en-us/articles/200172016). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/waf", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WAF]]._unwrapper, - ), - cast_to=cast(Type[Optional[WAF]], ResultWrapper[WAF]), - ) - - -class WAFResourceWithRawResponse: - def __init__(self, waf: WAFResource) -> None: - self._waf = waf - - self.edit = to_raw_response_wrapper( - waf.edit, - ) - self.get = to_raw_response_wrapper( - waf.get, - ) - - -class AsyncWAFResourceWithRawResponse: - def __init__(self, waf: AsyncWAFResource) -> None: - self._waf = waf - - self.edit = async_to_raw_response_wrapper( - waf.edit, - ) - self.get = async_to_raw_response_wrapper( - waf.get, - ) - - -class WAFResourceWithStreamingResponse: - def __init__(self, waf: WAFResource) -> None: - self._waf = waf - - self.edit = to_streamed_response_wrapper( - waf.edit, - ) - self.get = to_streamed_response_wrapper( - waf.get, - ) - - -class AsyncWAFResourceWithStreamingResponse: - def __init__(self, waf: AsyncWAFResource) -> None: - self._waf = waf - - self.edit = async_to_streamed_response_wrapper( - waf.edit, - ) - self.get = async_to_streamed_response_wrapper( - waf.get, - ) diff --git a/src/cloudflare/resources/zones/settings/webp.py b/src/cloudflare/resources/zones/settings/webp.py deleted file mode 100644 index e6fc0ac0ab4..00000000000 --- a/src/cloudflare/resources/zones/settings/webp.py +++ /dev/null @@ -1,270 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import webp_edit_params -from ....types.zones.settings.webp import WebP - -__all__ = ["WebPResource", "AsyncWebPResource"] - - -class WebPResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> WebPResourceWithRawResponse: - return WebPResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> WebPResourceWithStreamingResponse: - return WebPResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[WebP]: - """ - When the client requesting the image supports the WebP image codec, and WebP - offers a performance advantage over the original image format, Cloudflare will - serve a WebP version of the original image. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/webp", - body=maybe_transform({"value": value}, webp_edit_params.WebPEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WebP]]._unwrapper, - ), - cast_to=cast(Type[Optional[WebP]], ResultWrapper[WebP]), - ) - - def get( - self, - *, - zone_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[WebP]: - """ - When the client requesting the image supports the WebP image codec, and WebP - offers a performance advantage over the original image format, Cloudflare will - serve a WebP version of the original image. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/webp", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WebP]]._unwrapper, - ), - cast_to=cast(Type[Optional[WebP]], ResultWrapper[WebP]), - ) - - -class AsyncWebPResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncWebPResourceWithRawResponse: - return AsyncWebPResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncWebPResourceWithStreamingResponse: - return AsyncWebPResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[WebP]: - """ - When the client requesting the image supports the WebP image codec, and WebP - offers a performance advantage over the original image format, Cloudflare will - serve a WebP version of the original image. - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/webp", - body=await async_maybe_transform({"value": value}, webp_edit_params.WebPEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WebP]]._unwrapper, - ), - cast_to=cast(Type[Optional[WebP]], ResultWrapper[WebP]), - ) - - async def get( - self, - *, - zone_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[WebP]: - """ - When the client requesting the image supports the WebP image codec, and WebP - offers a performance advantage over the original image format, Cloudflare will - serve a WebP version of the original image. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/webp", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[WebP]]._unwrapper, - ), - cast_to=cast(Type[Optional[WebP]], ResultWrapper[WebP]), - ) - - -class WebPResourceWithRawResponse: - def __init__(self, webp: WebPResource) -> None: - self._webp = webp - - self.edit = to_raw_response_wrapper( - webp.edit, - ) - self.get = to_raw_response_wrapper( - webp.get, - ) - - -class AsyncWebPResourceWithRawResponse: - def __init__(self, webp: AsyncWebPResource) -> None: - self._webp = webp - - self.edit = async_to_raw_response_wrapper( - webp.edit, - ) - self.get = async_to_raw_response_wrapper( - webp.get, - ) - - -class WebPResourceWithStreamingResponse: - def __init__(self, webp: WebPResource) -> None: - self._webp = webp - - self.edit = to_streamed_response_wrapper( - webp.edit, - ) - self.get = to_streamed_response_wrapper( - webp.get, - ) - - -class AsyncWebPResourceWithStreamingResponse: - def __init__(self, webp: AsyncWebPResource) -> None: - self._webp = webp - - self.edit = async_to_streamed_response_wrapper( - webp.edit, - ) - self.get = async_to_streamed_response_wrapper( - webp.get, - ) diff --git a/src/cloudflare/resources/zones/settings/websocket.py b/src/cloudflare/resources/zones/settings/websocket.py deleted file mode 100644 index 9caba287e7d..00000000000 --- a/src/cloudflare/resources/zones/settings/websocket.py +++ /dev/null @@ -1,272 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import websocket_edit_params -from ....types.zones.settings.websocket import Websocket - -__all__ = ["WebsocketResource", "AsyncWebsocketResource"] - - -class WebsocketResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> WebsocketResourceWithRawResponse: - return WebsocketResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> WebsocketResourceWithStreamingResponse: - return WebsocketResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Websocket]: - """Changes Websockets setting. - - For more information about Websockets, please refer - to - [Using Cloudflare with WebSockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Using-Cloudflare-with-WebSockets). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/websockets", - body=maybe_transform({"value": value}, websocket_edit_params.WebsocketEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Websocket]]._unwrapper, - ), - cast_to=cast(Type[Optional[Websocket]], ResultWrapper[Websocket]), - ) - - def get( - self, - *, - zone_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[Websocket]: - """Gets Websockets setting. - - For more information about Websockets, please refer to - [Using Cloudflare with WebSockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Using-Cloudflare-with-WebSockets). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/websockets", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Websocket]]._unwrapper, - ), - cast_to=cast(Type[Optional[Websocket]], ResultWrapper[Websocket]), - ) - - -class AsyncWebsocketResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncWebsocketResourceWithRawResponse: - return AsyncWebsocketResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncWebsocketResourceWithStreamingResponse: - return AsyncWebsocketResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["off", "on"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[Websocket]: - """Changes Websockets setting. - - For more information about Websockets, please refer - to - [Using Cloudflare with WebSockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Using-Cloudflare-with-WebSockets). - - Args: - zone_id: Identifier - - value: Value of the zone setting. - - 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}/settings/websockets", - body=await async_maybe_transform({"value": value}, websocket_edit_params.WebsocketEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Websocket]]._unwrapper, - ), - cast_to=cast(Type[Optional[Websocket]], ResultWrapper[Websocket]), - ) - - async def get( - self, - *, - zone_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[Websocket]: - """Gets Websockets setting. - - For more information about Websockets, please refer to - [Using Cloudflare with WebSockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Using-Cloudflare-with-WebSockets). - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/websockets", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Websocket]]._unwrapper, - ), - cast_to=cast(Type[Optional[Websocket]], ResultWrapper[Websocket]), - ) - - -class WebsocketResourceWithRawResponse: - def __init__(self, websocket: WebsocketResource) -> None: - self._websocket = websocket - - self.edit = to_raw_response_wrapper( - websocket.edit, - ) - self.get = to_raw_response_wrapper( - websocket.get, - ) - - -class AsyncWebsocketResourceWithRawResponse: - def __init__(self, websocket: AsyncWebsocketResource) -> None: - self._websocket = websocket - - self.edit = async_to_raw_response_wrapper( - websocket.edit, - ) - self.get = async_to_raw_response_wrapper( - websocket.get, - ) - - -class WebsocketResourceWithStreamingResponse: - def __init__(self, websocket: WebsocketResource) -> None: - self._websocket = websocket - - self.edit = to_streamed_response_wrapper( - websocket.edit, - ) - self.get = to_streamed_response_wrapper( - websocket.get, - ) - - -class AsyncWebsocketResourceWithStreamingResponse: - def __init__(self, websocket: AsyncWebsocketResource) -> None: - self._websocket = websocket - - self.edit = async_to_streamed_response_wrapper( - websocket.edit, - ) - self.get = async_to_streamed_response_wrapper( - websocket.get, - ) diff --git a/src/cloudflare/resources/zones/settings/zero_rtt.py b/src/cloudflare/resources/zones/settings/zero_rtt.py deleted file mode 100644 index fafd4dea55d..00000000000 --- a/src/cloudflare/resources/zones/settings/zero_rtt.py +++ /dev/null @@ -1,262 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, Optional, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import zero_rtt_edit_params -from ....types.zones.settings.zero_rtt import ZeroRTT - -__all__ = ["ZeroRTTResource", "AsyncZeroRTTResource"] - - -class ZeroRTTResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ZeroRTTResourceWithRawResponse: - return ZeroRTTResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ZeroRTTResourceWithStreamingResponse: - return ZeroRTTResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ZeroRTT]: - """ - Changes the 0-RTT session resumption setting. - - Args: - zone_id: Identifier - - value: Value of the 0-RTT setting. - - 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}/settings/0rtt", - body=maybe_transform({"value": value}, zero_rtt_edit_params.ZeroRTTEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ZeroRTT]]._unwrapper, - ), - cast_to=cast(Type[Optional[ZeroRTT]], ResultWrapper[ZeroRTT]), - ) - - def get( - self, - *, - zone_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[ZeroRTT]: - """ - Gets 0-RTT session resumption setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/0rtt", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ZeroRTT]]._unwrapper, - ), - cast_to=cast(Type[Optional[ZeroRTT]], ResultWrapper[ZeroRTT]), - ) - - -class AsyncZeroRTTResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncZeroRTTResourceWithRawResponse: - return AsyncZeroRTTResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncZeroRTTResourceWithStreamingResponse: - return AsyncZeroRTTResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["on", "off"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[ZeroRTT]: - """ - Changes the 0-RTT session resumption setting. - - Args: - zone_id: Identifier - - value: Value of the 0-RTT setting. - - 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}/settings/0rtt", - body=await async_maybe_transform({"value": value}, zero_rtt_edit_params.ZeroRTTEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ZeroRTT]]._unwrapper, - ), - cast_to=cast(Type[Optional[ZeroRTT]], ResultWrapper[ZeroRTT]), - ) - - async def get( - self, - *, - zone_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[ZeroRTT]: - """ - Gets 0-RTT session resumption setting. - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/0rtt", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[ZeroRTT]]._unwrapper, - ), - cast_to=cast(Type[Optional[ZeroRTT]], ResultWrapper[ZeroRTT]), - ) - - -class ZeroRTTResourceWithRawResponse: - def __init__(self, zero_rtt: ZeroRTTResource) -> None: - self._zero_rtt = zero_rtt - - self.edit = to_raw_response_wrapper( - zero_rtt.edit, - ) - self.get = to_raw_response_wrapper( - zero_rtt.get, - ) - - -class AsyncZeroRTTResourceWithRawResponse: - def __init__(self, zero_rtt: AsyncZeroRTTResource) -> None: - self._zero_rtt = zero_rtt - - self.edit = async_to_raw_response_wrapper( - zero_rtt.edit, - ) - self.get = async_to_raw_response_wrapper( - zero_rtt.get, - ) - - -class ZeroRTTResourceWithStreamingResponse: - def __init__(self, zero_rtt: ZeroRTTResource) -> None: - self._zero_rtt = zero_rtt - - self.edit = to_streamed_response_wrapper( - zero_rtt.edit, - ) - self.get = to_streamed_response_wrapper( - zero_rtt.get, - ) - - -class AsyncZeroRTTResourceWithStreamingResponse: - def __init__(self, zero_rtt: AsyncZeroRTTResource) -> None: - self._zero_rtt = zero_rtt - - self.edit = async_to_streamed_response_wrapper( - zero_rtt.edit, - ) - self.get = async_to_streamed_response_wrapper( - zero_rtt.get, - ) diff --git a/src/cloudflare/types/zones/settings/__init__.py b/src/cloudflare/types/zones/settings/__init__.py index 28f4f4e8a01..b44583a9742 100644 --- a/src/cloudflare/types/zones/settings/__init__.py +++ b/src/cloudflare/types/zones/settings/__init__.py @@ -2,123 +2,9 @@ from __future__ import annotations -from .nel import NEL as NEL -from .ssl import SSL as SSL -from .waf import WAF as WAF -from .ipv6 import IPV6 as IPV6 -from .webp import WebP as WebP -from .http2 import HTTP2 as HTTP2 -from .http3 import HTTP3 as HTTP3 -from .brotli import Brotli as Brotli -from .minify import Minify as Minify -from .mirage import Mirage as Mirage -from .polish import Polish as Polish -from .ciphers import Ciphers as Ciphers -from .tls_1_3 import TLS1_3 as TLS1_3 -from .zero_rtt import ZeroRTT as ZeroRTT -from .nel_param import NELParam as NELParam -from .websocket import Websocket as Websocket -from .cache_level import CacheLevel as CacheLevel -from .early_hints import EarlyHints as EarlyHints -from .pseudo_ipv4 import PseudoIPV4 as PseudoIPV4 -from .polish_param import PolishParam as PolishParam -from .advanced_ddos import AdvancedDDoS as AdvancedDDoS -from .always_online import AlwaysOnline as AlwaysOnline -from .browser_check import BrowserCheck as BrowserCheck -from .challenge_ttl import ChallengeTTL as ChallengeTTL from .font_settings import FontSettings as FontSettings -from .rocket_loader import RocketLoader as RocketLoader -from .image_resizing import ImageResizing as ImageResizing -from .ip_geolocation import IPGeolocation as IPGeolocation -from .security_level import SecurityLevel as SecurityLevel -from .min_tls_version import MinTLSVersion as MinTLSVersion -from .mobile_redirect import MobileRedirect as MobileRedirect -from .nel_edit_params import NELEditParams as NELEditParams -from .ssl_edit_params import SSLEditParams as SSLEditParams -from .ssl_recommender import SSLRecommender as SSLRecommender -from .tls_client_auth import TLSClientAuth as TLSClientAuth -from .waf_edit_params import WAFEditParams as WAFEditParams -from .always_use_https import AlwaysUseHTTPS as AlwaysUseHTTPS -from .development_mode import DevelopmentMode as DevelopmentMode -from .ipv6_edit_params import IPV6EditParams as IPV6EditParams -from .orange_to_orange import OrangeToOrange as OrangeToOrange -from .prefetch_preload import PrefetchPreload as PrefetchPreload -from .security_headers import SecurityHeaders as SecurityHeaders -from .webp_edit_params import WebPEditParams as WebPEditParams -from .browser_cache_ttl import BrowserCacheTTL as BrowserCacheTTL -from .email_obfuscation import EmailObfuscation as EmailObfuscation -from .h2_prioritization import H2Prioritization as H2Prioritization -from .http2_edit_params import HTTP2EditParams as HTTP2EditParams -from .http3_edit_params import HTTP3EditParams as HTTP3EditParams -from .brotli_edit_params import BrotliEditParams as BrotliEditParams -from .cipher_edit_params import CipherEditParams as CipherEditParams -from .hotlink_protection import HotlinkProtection as HotlinkProtection -from .minify_edit_params import MinifyEditParams as MinifyEditParams -from .mirage_edit_params import MirageEditParams as MirageEditParams -from .polish_edit_params import PolishEditParams as PolishEditParams -from .proxy_read_timeout import ProxyReadTimeout as ProxyReadTimeout -from .response_buffering import ResponseBuffering as ResponseBuffering -from .opportunistic_onion import OpportunisticOnion as OpportunisticOnion -from .rocket_loader_param import RocketLoaderParam as RocketLoaderParam -from .tls_1_3_edit_params import TLS1_3EditParams as TLS1_3EditParams -from .image_resizing_param import ImageResizingParam as ImageResizingParam -from .server_side_excludes import ServerSideExcludes as ServerSideExcludes -from .zero_rtt_edit_params import ZeroRTTEditParams as ZeroRTTEditParams -from .ssl_recommender_param import SSLRecommenderParam as SSLRecommenderParam -from .true_client_ip_header import TrueClientIPHeader as TrueClientIPHeader -from .websocket_edit_params import WebsocketEditParams as WebsocketEditParams -from .early_hint_edit_params import EarlyHintEditParams as EarlyHintEditParams -from .orange_to_orange_param import OrangeToOrangeParam as OrangeToOrangeParam -from .cache_level_edit_params import CacheLevelEditParams as CacheLevelEditParams -from .h2_prioritization_param import H2PrioritizationParam as H2PrioritizationParam from .origin_max_http_version import OriginMaxHTTPVersion as OriginMaxHTTPVersion -from .pseudo_ipv4_edit_params import PseudoIPV4EditParams as PseudoIPV4EditParams -from .automatic_https_rewrites import AutomaticHTTPSRewrites as AutomaticHTTPSRewrites from .font_setting_edit_params import FontSettingEditParams as FontSettingEditParams -from .opportunistic_encryption import OpportunisticEncryption as OpportunisticEncryption -from .proxy_read_timeout_param import ProxyReadTimeoutParam as ProxyReadTimeoutParam -from .always_online_edit_params import AlwaysOnlineEditParams as AlwaysOnlineEditParams -from .browser_check_edit_params import BrowserCheckEditParams as BrowserCheckEditParams -from .challenge_ttl_edit_params import ChallengeTTLEditParams as ChallengeTTLEditParams -from .rocket_loader_edit_params import RocketLoaderEditParams as RocketLoaderEditParams -from .image_resizing_edit_params import ImageResizingEditParams as ImageResizingEditParams -from .ip_geolocation_edit_params import IPGeolocationEditParams as IPGeolocationEditParams -from .security_level_edit_params import SecurityLevelEditParams as SecurityLevelEditParams -from .min_tls_version_edit_params import MinTLSVersionEditParams as MinTLSVersionEditParams -from .mobile_redirect_edit_params import MobileRedirectEditParams as MobileRedirectEditParams -from .origin_error_page_pass_thru import OriginErrorPagePassThru as OriginErrorPagePassThru -from .security_header_edit_params import SecurityHeaderEditParams as SecurityHeaderEditParams -from .sort_query_string_for_cache import SortQueryStringForCache as SortQueryStringForCache -from .ssl_recommender_edit_params import SSLRecommenderEditParams as SSLRecommenderEditParams -from .tls_client_auth_edit_params import TLSClientAuthEditParams as TLSClientAuthEditParams -from .always_use_https_edit_params import AlwaysUseHTTPSEditParams as AlwaysUseHTTPSEditParams -from .development_mode_edit_params import DevelopmentModeEditParams as DevelopmentModeEditParams -from .orange_to_orange_edit_params import OrangeToOrangeEditParams as OrangeToOrangeEditParams -from .prefetch_preload_edit_params import PrefetchPreloadEditParams as PrefetchPreloadEditParams -from .browser_cache_ttl_edit_params import BrowserCacheTTLEditParams as BrowserCacheTTLEditParams -from .email_obfuscation_edit_params import EmailObfuscationEditParams as EmailObfuscationEditParams -from .h2_prioritization_edit_params import H2PrioritizationEditParams as H2PrioritizationEditParams -from .hotlink_protection_edit_params import HotlinkProtectionEditParams as HotlinkProtectionEditParams -from .proxy_read_timeout_edit_params import ProxyReadTimeoutEditParams as ProxyReadTimeoutEditParams -from .response_buffering_edit_params import ResponseBufferingEditParams as ResponseBufferingEditParams -from .automatic_platform_optimization import AutomaticPlatformOptimization as AutomaticPlatformOptimization -from .opportunistic_onion_edit_params import OpportunisticOnionEditParams as OpportunisticOnionEditParams -from .server_side_exclude_edit_params import ServerSideExcludeEditParams as ServerSideExcludeEditParams -from .true_client_ip_header_edit_params import TrueClientIPHeaderEditParams as TrueClientIPHeaderEditParams -from .automatic_https_rewrite_edit_params import AutomaticHTTPSRewriteEditParams as AutomaticHTTPSRewriteEditParams from .origin_max_http_version_edit_params import OriginMaxHTTPVersionEditParams as OriginMaxHTTPVersionEditParams -from .opportunistic_encryption_edit_params import OpportunisticEncryptionEditParams as OpportunisticEncryptionEditParams from .origin_max_http_version_get_response import OriginMaxHTTPVersionGetResponse as OriginMaxHTTPVersionGetResponse -from .automatic_platform_optimization_param import ( - AutomaticPlatformOptimizationParam as AutomaticPlatformOptimizationParam, -) from .origin_max_http_version_edit_response import OriginMaxHTTPVersionEditResponse as OriginMaxHTTPVersionEditResponse -from .origin_error_page_pass_thru_edit_params import ( - OriginErrorPagePassThruEditParams as OriginErrorPagePassThruEditParams, -) -from .sort_query_string_for_cache_edit_params import ( - SortQueryStringForCacheEditParams as SortQueryStringForCacheEditParams, -) -from .automatic_platform_optimization_edit_params import ( - AutomaticPlatformOptimizationEditParams as AutomaticPlatformOptimizationEditParams, -) diff --git a/src/cloudflare/types/zones/settings/always_online_edit_params.py b/src/cloudflare/types/zones/settings/always_online_edit_params.py deleted file mode 100644 index 9ab0ad39a56..00000000000 --- a/src/cloudflare/types/zones/settings/always_online_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["AlwaysOnlineEditParams"] - - -class AlwaysOnlineEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/always_use_https_edit_params.py b/src/cloudflare/types/zones/settings/always_use_https_edit_params.py deleted file mode 100644 index c50e7c29249..00000000000 --- a/src/cloudflare/types/zones/settings/always_use_https_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["AlwaysUseHTTPSEditParams"] - - -class AlwaysUseHTTPSEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_params.py b/src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_params.py deleted file mode 100644 index 2122aa8e28c..00000000000 --- a/src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_params.py +++ /dev/null @@ -1,18 +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__ = ["AutomaticHTTPSRewriteEditParams"] - - -class AutomaticHTTPSRewriteEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """ - Value of the zone setting. Notes: Default value depends on the zone's plan - level. - """ diff --git a/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.py b/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.py deleted file mode 100644 index a0f822dc9e1..00000000000 --- a/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.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_extensions import Required, TypedDict - -from .automatic_platform_optimization_param import AutomaticPlatformOptimizationParam - -__all__ = ["AutomaticPlatformOptimizationEditParams"] - - -class AutomaticPlatformOptimizationEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[AutomaticPlatformOptimizationParam] diff --git a/src/cloudflare/types/zones/settings/automatic_platform_optimization_param.py b/src/cloudflare/types/zones/settings/automatic_platform_optimization_param.py deleted file mode 100644 index b39664ca0e8..00000000000 --- a/src/cloudflare/types/zones/settings/automatic_platform_optimization_param.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 - -__all__ = ["AutomaticPlatformOptimizationParam"] - - -class AutomaticPlatformOptimizationParam(TypedDict, total=False): - cache_by_device_type: Required[bool] - """ - Indicates whether or not - [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - is enabled. - """ - - cf: Required[bool] - """Indicates whether or not Cloudflare proxy is enabled.""" - - enabled: Required[bool] - """Indicates whether or not Automatic Platform Optimization is enabled.""" - - hostnames: Required[List[str]] - """ - An array of hostnames where Automatic Platform Optimization for WordPress is - activated. - """ - - wordpress: Required[bool] - """Indicates whether or not site is powered by WordPress.""" - - wp_plugin: Required[bool] - """ - Indicates whether or not - [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - installed. - """ diff --git a/src/cloudflare/types/zones/settings/brotli_edit_params.py b/src/cloudflare/types/zones/settings/brotli_edit_params.py deleted file mode 100644 index d2736f826af..00000000000 --- a/src/cloudflare/types/zones/settings/brotli_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["BrotliEditParams"] - - -class BrotliEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["off", "on"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/browser_cache_ttl_edit_params.py b/src/cloudflare/types/zones/settings/browser_cache_ttl_edit_params.py deleted file mode 100644 index 64438e8bbf6..00000000000 --- a/src/cloudflare/types/zones/settings/browser_cache_ttl_edit_params.py +++ /dev/null @@ -1,49 +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__ = ["BrowserCacheTTLEditParams"] - - -class BrowserCacheTTLEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[ - Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ] - ] - """ - Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - `Respect Existing Headers` - """ diff --git a/src/cloudflare/types/zones/settings/browser_check_edit_params.py b/src/cloudflare/types/zones/settings/browser_check_edit_params.py deleted file mode 100644 index 3fea828d352..00000000000 --- a/src/cloudflare/types/zones/settings/browser_check_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["BrowserCheckEditParams"] - - -class BrowserCheckEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/cache_level_edit_params.py b/src/cloudflare/types/zones/settings/cache_level_edit_params.py deleted file mode 100644 index e1906e13a11..00000000000 --- a/src/cloudflare/types/zones/settings/cache_level_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["CacheLevelEditParams"] - - -class CacheLevelEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["aggressive", "basic", "simplified"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/challenge_ttl_edit_params.py b/src/cloudflare/types/zones/settings/challenge_ttl_edit_params.py deleted file mode 100644 index 4aab25dfdc1..00000000000 --- a/src/cloudflare/types/zones/settings/challenge_ttl_edit_params.py +++ /dev/null @@ -1,17 +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__ = ["ChallengeTTLEditParams"] - - -class ChallengeTTLEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[ - Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] - ] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/cipher_edit_params.py b/src/cloudflare/types/zones/settings/cipher_edit_params.py deleted file mode 100644 index cdf75ea4084..00000000000 --- a/src/cloudflare/types/zones/settings/cipher_edit_params.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 Required, TypedDict - -__all__ = ["CipherEditParams"] - - -class CipherEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[List[str]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/development_mode_edit_params.py b/src/cloudflare/types/zones/settings/development_mode_edit_params.py deleted file mode 100644 index 6966b2ee44a..00000000000 --- a/src/cloudflare/types/zones/settings/development_mode_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["DevelopmentModeEditParams"] - - -class DevelopmentModeEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/early_hint_edit_params.py b/src/cloudflare/types/zones/settings/early_hint_edit_params.py deleted file mode 100644 index 70af441c98a..00000000000 --- a/src/cloudflare/types/zones/settings/early_hint_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["EarlyHintEditParams"] - - -class EarlyHintEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/email_obfuscation_edit_params.py b/src/cloudflare/types/zones/settings/email_obfuscation_edit_params.py deleted file mode 100644 index b9e7ab5b6ca..00000000000 --- a/src/cloudflare/types/zones/settings/email_obfuscation_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["EmailObfuscationEditParams"] - - -class EmailObfuscationEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py b/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py deleted file mode 100644 index 1b51b6116d1..00000000000 --- a/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py +++ /dev/null @@ -1,21 +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 .h2_prioritization_param import H2PrioritizationParam - -__all__ = ["H2PrioritizationEditParams"] - - -class H2PrioritizationEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[H2PrioritizationParam] - """ - HTTP/2 Edge Prioritization optimises the delivery of resources served through - HTTP/2 to improve page load performance. It also supports fine control of - content delivery when used in conjunction with Workers. - """ diff --git a/src/cloudflare/types/zones/settings/h2_prioritization_param.py b/src/cloudflare/types/zones/settings/h2_prioritization_param.py deleted file mode 100644 index 0d3cc769689..00000000000 --- a/src/cloudflare/types/zones/settings/h2_prioritization_param.py +++ /dev/null @@ -1,15 +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__ = ["H2PrioritizationParam"] - - -class H2PrioritizationParam(TypedDict, total=False): - id: Required[Literal["h2_prioritization"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "custom"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/hotlink_protection_edit_params.py b/src/cloudflare/types/zones/settings/hotlink_protection_edit_params.py deleted file mode 100644 index 98a2005e715..00000000000 --- a/src/cloudflare/types/zones/settings/hotlink_protection_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["HotlinkProtectionEditParams"] - - -class HotlinkProtectionEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/http2_edit_params.py b/src/cloudflare/types/zones/settings/http2_edit_params.py deleted file mode 100644 index 2260d416ef0..00000000000 --- a/src/cloudflare/types/zones/settings/http2_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["HTTP2EditParams"] - - -class HTTP2EditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the HTTP2 setting.""" diff --git a/src/cloudflare/types/zones/settings/http3_edit_params.py b/src/cloudflare/types/zones/settings/http3_edit_params.py deleted file mode 100644 index 3a4dc28ce07..00000000000 --- a/src/cloudflare/types/zones/settings/http3_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["HTTP3EditParams"] - - -class HTTP3EditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the HTTP3 setting.""" diff --git a/src/cloudflare/types/zones/settings/image_resizing_edit_params.py b/src/cloudflare/types/zones/settings/image_resizing_edit_params.py deleted file mode 100644 index 4425d3e42c6..00000000000 --- a/src/cloudflare/types/zones/settings/image_resizing_edit_params.py +++ /dev/null @@ -1,22 +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 .image_resizing_param import ImageResizingParam - -__all__ = ["ImageResizingEditParams"] - - -class ImageResizingEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[ImageResizingParam] - """ - Image Resizing provides on-demand resizing, conversion and optimisation for - images served through Cloudflare's network. Refer to the - [Image Resizing documentation](https://developers.cloudflare.com/images/) for - more information. - """ diff --git a/src/cloudflare/types/zones/settings/image_resizing_param.py b/src/cloudflare/types/zones/settings/image_resizing_param.py deleted file mode 100644 index 0b6d7c66979..00000000000 --- a/src/cloudflare/types/zones/settings/image_resizing_param.py +++ /dev/null @@ -1,15 +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__ = ["ImageResizingParam"] - - -class ImageResizingParam(TypedDict, total=False): - id: Required[Literal["image_resizing"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "open"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ip_geolocation_edit_params.py b/src/cloudflare/types/zones/settings/ip_geolocation_edit_params.py deleted file mode 100644 index 5d06f9b8cfa..00000000000 --- a/src/cloudflare/types/zones/settings/ip_geolocation_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["IPGeolocationEditParams"] - - -class IPGeolocationEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ipv6_edit_params.py b/src/cloudflare/types/zones/settings/ipv6_edit_params.py deleted file mode 100644 index 930e55e5270..00000000000 --- a/src/cloudflare/types/zones/settings/ipv6_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["IPV6EditParams"] - - -class IPV6EditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["off", "on"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/min_tls_version_edit_params.py b/src/cloudflare/types/zones/settings/min_tls_version_edit_params.py deleted file mode 100644 index a65feb7e134..00000000000 --- a/src/cloudflare/types/zones/settings/min_tls_version_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["MinTLSVersionEditParams"] - - -class MinTLSVersionEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["1.0", "1.1", "1.2", "1.3"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/minify_edit_params.py b/src/cloudflare/types/zones/settings/minify_edit_params.py deleted file mode 100644 index 71a2e4988cf..00000000000 --- a/src/cloudflare/types/zones/settings/minify_edit_params.py +++ /dev/null @@ -1,26 +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__ = ["MinifyEditParams", "Value"] - - -class MinifyEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Value] - """Value of the zone setting.""" - - -class Value(TypedDict, total=False): - css: Literal["on", "off"] - """Automatically minify all CSS files for your website.""" - - html: Literal["on", "off"] - """Automatically minify all HTML files for your website.""" - - js: Literal["on", "off"] - """Automatically minify all JavaScript files for your website.""" diff --git a/src/cloudflare/types/zones/settings/mirage_edit_params.py b/src/cloudflare/types/zones/settings/mirage_edit_params.py deleted file mode 100644 index 3ad412bf012..00000000000 --- a/src/cloudflare/types/zones/settings/mirage_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["MirageEditParams"] - - -class MirageEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/mobile_redirect.py b/src/cloudflare/types/zones/settings/mobile_redirect.py index 66bab1b5ff9..1b6be5aa420 100644 --- a/src/cloudflare/types/zones/settings/mobile_redirect.py +++ b/src/cloudflare/types/zones/settings/mobile_redirect.py @@ -17,7 +17,11 @@ class Value(BaseModel): """ status: Optional[Literal["on", "off"]] = None - """Whether or not mobile redirect is enabled.""" + """ + Deprecated: Use Single Redirects instead + https://developers.cloudflare.com/rules/url-forwarding/single-redirects/examples/#perform-mobile-redirects. + Whether or not mobile redirect is enabled. + """ strip_uri: Optional[bool] = None """ diff --git a/src/cloudflare/types/zones/settings/mobile_redirect_edit_params.py b/src/cloudflare/types/zones/settings/mobile_redirect_edit_params.py deleted file mode 100644 index da3cac23a24..00000000000 --- a/src/cloudflare/types/zones/settings/mobile_redirect_edit_params.py +++ /dev/null @@ -1,33 +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, Required, TypedDict - -__all__ = ["MobileRedirectEditParams", "Value"] - - -class MobileRedirectEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Value] - """Value of the zone setting.""" - - -class Value(TypedDict, total=False): - mobile_subdomain: Optional[str] - """ - Which subdomain prefix you wish to redirect visitors on mobile devices to - (subdomain must already exist). - """ - - status: Literal["on", "off"] - """Whether or not mobile redirect is enabled.""" - - strip_uri: bool - """ - Whether to drop the current page path and redirect to the mobile subdomain URL - root, or keep the path and redirect to the same page on the mobile subdomain. - """ diff --git a/src/cloudflare/types/zones/settings/nel_edit_params.py b/src/cloudflare/types/zones/settings/nel_edit_params.py deleted file mode 100644 index 114d1000df4..00000000000 --- a/src/cloudflare/types/zones/settings/nel_edit_params.py +++ /dev/null @@ -1,17 +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 .nel_param import NELParam - -__all__ = ["NELEditParams"] - - -class NELEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[NELParam] - """Enable Network Error Logging reporting on your zone. (Beta)""" diff --git a/src/cloudflare/types/zones/settings/nel_param.py b/src/cloudflare/types/zones/settings/nel_param.py deleted file mode 100644 index c692f294f67..00000000000 --- a/src/cloudflare/types/zones/settings/nel_param.py +++ /dev/null @@ -1,19 +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__ = ["NELParam", "Value"] - - -class Value(TypedDict, total=False): - enabled: bool - - -class NELParam(TypedDict, total=False): - id: Required[Literal["nel"]] - """Zone setting identifier.""" - - value: Required[Value] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/opportunistic_encryption_edit_params.py b/src/cloudflare/types/zones/settings/opportunistic_encryption_edit_params.py deleted file mode 100644 index 404adf6e9af..00000000000 --- a/src/cloudflare/types/zones/settings/opportunistic_encryption_edit_params.py +++ /dev/null @@ -1,18 +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__ = ["OpportunisticEncryptionEditParams"] - - -class OpportunisticEncryptionEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """ - Value of the zone setting. Notes: Default value depends on the zone's plan - level. - """ diff --git a/src/cloudflare/types/zones/settings/opportunistic_onion_edit_params.py b/src/cloudflare/types/zones/settings/opportunistic_onion_edit_params.py deleted file mode 100644 index 197c7dd631d..00000000000 --- a/src/cloudflare/types/zones/settings/opportunistic_onion_edit_params.py +++ /dev/null @@ -1,18 +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__ = ["OpportunisticOnionEditParams"] - - -class OpportunisticOnionEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """ - Value of the zone setting. Notes: Default value depends on the zone's plan - level. - """ diff --git a/src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py b/src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py deleted file mode 100644 index d2b659926cf..00000000000 --- a/src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -from .orange_to_orange_param import OrangeToOrangeParam - -__all__ = ["OrangeToOrangeEditParams"] - - -class OrangeToOrangeEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[OrangeToOrangeParam] - """ - Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - on Cloudflare. - """ diff --git a/src/cloudflare/types/zones/settings/orange_to_orange_param.py b/src/cloudflare/types/zones/settings/orange_to_orange_param.py deleted file mode 100644 index 9a28f503c63..00000000000 --- a/src/cloudflare/types/zones/settings/orange_to_orange_param.py +++ /dev/null @@ -1,15 +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__ = ["OrangeToOrangeParam"] - - -class OrangeToOrangeParam(TypedDict, total=False): - id: Required[Literal["orange_to_orange"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_params.py b/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_params.py deleted file mode 100644 index 2adafcd3433..00000000000 --- a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["OriginErrorPagePassThruEditParams"] - - -class OriginErrorPagePassThruEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/polish_edit_params.py b/src/cloudflare/types/zones/settings/polish_edit_params.py deleted file mode 100644 index 044f3b98989..00000000000 --- a/src/cloudflare/types/zones/settings/polish_edit_params.py +++ /dev/null @@ -1,24 +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 .polish_param import PolishParam - -__all__ = ["PolishEditParams"] - - -class PolishEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[PolishParam] - """Removes metadata and compresses your images for faster page load times. - - Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on - visual quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for - faster image loading. Larger JPEGs are converted to progressive images, loading - a lower-resolution image first and ending in a higher-resolution version. Not - recommended for hi-res photography sites. - """ diff --git a/src/cloudflare/types/zones/settings/polish_param.py b/src/cloudflare/types/zones/settings/polish_param.py deleted file mode 100644 index 84f4c0b65c9..00000000000 --- a/src/cloudflare/types/zones/settings/polish_param.py +++ /dev/null @@ -1,15 +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__ = ["PolishParam"] - - -class PolishParam(TypedDict, total=False): - id: Required[Literal["polish"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "lossless", "lossy"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/prefetch_preload_edit_params.py b/src/cloudflare/types/zones/settings/prefetch_preload_edit_params.py deleted file mode 100644 index 5164941cfb4..00000000000 --- a/src/cloudflare/types/zones/settings/prefetch_preload_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["PrefetchPreloadEditParams"] - - -class PrefetchPreloadEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py b/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py deleted file mode 100644 index 7813472d0e3..00000000000 --- a/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py +++ /dev/null @@ -1,17 +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 .proxy_read_timeout_param import ProxyReadTimeoutParam - -__all__ = ["ProxyReadTimeoutEditParams"] - - -class ProxyReadTimeoutEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[ProxyReadTimeoutParam] - """Maximum time between two read operations from origin.""" diff --git a/src/cloudflare/types/zones/settings/proxy_read_timeout_param.py b/src/cloudflare/types/zones/settings/proxy_read_timeout_param.py deleted file mode 100644 index 5db20403058..00000000000 --- a/src/cloudflare/types/zones/settings/proxy_read_timeout_param.py +++ /dev/null @@ -1,15 +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__ = ["ProxyReadTimeoutParam"] - - -class ProxyReadTimeoutParam(TypedDict, total=False): - id: Required[Literal["proxy_read_timeout"]] - """ID of the zone setting.""" - - value: Required[float] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/pseudo_ipv4_edit_params.py b/src/cloudflare/types/zones/settings/pseudo_ipv4_edit_params.py deleted file mode 100644 index 833d68f2706..00000000000 --- a/src/cloudflare/types/zones/settings/pseudo_ipv4_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["PseudoIPV4EditParams"] - - -class PseudoIPV4EditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["off", "add_header", "overwrite_header"]] - """Value of the Pseudo IPv4 setting.""" diff --git a/src/cloudflare/types/zones/settings/response_buffering_edit_params.py b/src/cloudflare/types/zones/settings/response_buffering_edit_params.py deleted file mode 100644 index 7d1135c5253..00000000000 --- a/src/cloudflare/types/zones/settings/response_buffering_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["ResponseBufferingEditParams"] - - -class ResponseBufferingEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py b/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py deleted file mode 100644 index e66a7c774cb..00000000000 --- a/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py +++ /dev/null @@ -1,28 +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 .rocket_loader_param import RocketLoaderParam - -__all__ = ["RocketLoaderEditParams"] - - -class RocketLoaderEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[RocketLoaderParam] - """ - Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - prioritises rendering your content while loading your site's Javascript - asynchronously. Turning on Rocket Loader will immediately improve a web page's - rendering time sometimes measured as Time to First Paint (TTFP), and also the - `window.onload` time (assuming there is JavaScript on the page). This can have a - positive impact on your Google search ranking. When turned on, Rocket Loader - will automatically defer the loading of all Javascript referenced in your HTML, - with no configuration required. Refer to - [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - for more information. - """ diff --git a/src/cloudflare/types/zones/settings/rocket_loader_param.py b/src/cloudflare/types/zones/settings/rocket_loader_param.py deleted file mode 100644 index d72dfe24e23..00000000000 --- a/src/cloudflare/types/zones/settings/rocket_loader_param.py +++ /dev/null @@ -1,15 +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__ = ["RocketLoaderParam"] - - -class RocketLoaderParam(TypedDict, total=False): - id: Required[Literal["rocket_loader"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/security_header_edit_params.py b/src/cloudflare/types/zones/settings/security_header_edit_params.py deleted file mode 100644 index 4efdddffb6f..00000000000 --- a/src/cloudflare/types/zones/settings/security_header_edit_params.py +++ /dev/null @@ -1,33 +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__ = ["SecurityHeaderEditParams", "Value", "ValueStrictTransportSecurity"] - - -class SecurityHeaderEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Value] - - -class ValueStrictTransportSecurity(TypedDict, total=False): - enabled: bool - """Whether or not strict transport security is enabled.""" - - include_subdomains: bool - """Include all subdomains for strict transport security.""" - - max_age: float - """Max age in seconds of the strict transport security.""" - - nosniff: bool - """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" - - -class Value(TypedDict, total=False): - strict_transport_security: ValueStrictTransportSecurity - """Strict Transport Security.""" diff --git a/src/cloudflare/types/zones/settings/security_level_edit_params.py b/src/cloudflare/types/zones/settings/security_level_edit_params.py deleted file mode 100644 index cf010882c34..00000000000 --- a/src/cloudflare/types/zones/settings/security_level_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["SecurityLevelEditParams"] - - -class SecurityLevelEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["off", "essentially_off", "low", "medium", "high", "under_attack"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/server_side_exclude_edit_params.py b/src/cloudflare/types/zones/settings/server_side_exclude_edit_params.py deleted file mode 100644 index 37de328a488..00000000000 --- a/src/cloudflare/types/zones/settings/server_side_exclude_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["ServerSideExcludeEditParams"] - - -class ServerSideExcludeEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_params.py b/src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_params.py deleted file mode 100644 index d99c398a030..00000000000 --- a/src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["SortQueryStringForCacheEditParams"] - - -class SortQueryStringForCacheEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ssl_edit_params.py b/src/cloudflare/types/zones/settings/ssl_edit_params.py deleted file mode 100644 index f64682e0fa5..00000000000 --- a/src/cloudflare/types/zones/settings/ssl_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["SSLEditParams"] - - -class SSLEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["off", "flexible", "full", "strict"]] - """Value of the zone setting. Notes: Depends on the zone's plan level""" diff --git a/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py b/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py deleted file mode 100644 index 4006b39479e..00000000000 --- a/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py +++ /dev/null @@ -1,21 +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 .ssl_recommender_param import SSLRecommenderParam - -__all__ = ["SSLRecommenderEditParams"] - - -class SSLRecommenderEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[SSLRecommenderParam] - """ - Enrollment in the SSL/TLS Recommender service which tries to detect and - recommend (by sending periodic emails) the most secure SSL/TLS setting your - origin servers support. - """ diff --git a/src/cloudflare/types/zones/settings/ssl_recommender_param.py b/src/cloudflare/types/zones/settings/ssl_recommender_param.py deleted file mode 100644 index 0189ce02e60..00000000000 --- a/src/cloudflare/types/zones/settings/ssl_recommender_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -__all__ = ["SSLRecommenderParam"] - - -class SSLRecommenderParam(TypedDict, total=False): - id: Literal["ssl_recommender"] - """Enrollment value for SSL/TLS Recommender.""" - - enabled: bool - """ssl-recommender enrollment setting.""" diff --git a/src/cloudflare/types/zones/settings/tls_1_3_edit_params.py b/src/cloudflare/types/zones/settings/tls_1_3_edit_params.py deleted file mode 100644 index 08a0c83eb0f..00000000000 --- a/src/cloudflare/types/zones/settings/tls_1_3_edit_params.py +++ /dev/null @@ -1,18 +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__ = ["TLS1_3EditParams"] - - -class TLS1_3EditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off", "zrt"]] - """ - Value of the zone setting. Notes: Default value depends on the zone's plan - level. - """ diff --git a/src/cloudflare/types/zones/settings/tls_client_auth_edit_params.py b/src/cloudflare/types/zones/settings/tls_client_auth_edit_params.py deleted file mode 100644 index f75957d0b10..00000000000 --- a/src/cloudflare/types/zones/settings/tls_client_auth_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["TLSClientAuthEditParams"] - - -class TLSClientAuthEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/true_client_ip_header_edit_params.py b/src/cloudflare/types/zones/settings/true_client_ip_header_edit_params.py deleted file mode 100644 index 2bf86f31050..00000000000 --- a/src/cloudflare/types/zones/settings/true_client_ip_header_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["TrueClientIPHeaderEditParams"] - - -class TrueClientIPHeaderEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/waf_edit_params.py b/src/cloudflare/types/zones/settings/waf_edit_params.py deleted file mode 100644 index eb1fc28a612..00000000000 --- a/src/cloudflare/types/zones/settings/waf_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["WAFEditParams"] - - -class WAFEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/webp_edit_params.py b/src/cloudflare/types/zones/settings/webp_edit_params.py deleted file mode 100644 index 7850fcfcc33..00000000000 --- a/src/cloudflare/types/zones/settings/webp_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["WebPEditParams"] - - -class WebPEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["off", "on"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/websocket_edit_params.py b/src/cloudflare/types/zones/settings/websocket_edit_params.py deleted file mode 100644 index 5cafa6ddb08..00000000000 --- a/src/cloudflare/types/zones/settings/websocket_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["WebsocketEditParams"] - - -class WebsocketEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["off", "on"]] - """Value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zero_rtt_edit_params.py b/src/cloudflare/types/zones/settings/zero_rtt_edit_params.py deleted file mode 100644 index 360185bff7a..00000000000 --- a/src/cloudflare/types/zones/settings/zero_rtt_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["ZeroRTTEditParams"] - - -class ZeroRTTEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Value of the 0-RTT setting.""" diff --git a/tests/api_resources/zones/settings/test_advanced_ddos.py b/tests/api_resources/zones/settings/test_advanced_ddos.py deleted file mode 100644 index 0a02d5d3923..00000000000 --- a/tests/api_resources/zones/settings/test_advanced_ddos.py +++ /dev/null @@ -1,98 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import AdvancedDDoS - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAdvancedDDoS: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - advanced_ddos = client.zones.settings.advanced_ddos.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.advanced_ddos.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - advanced_ddos = response.parse() - assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.advanced_ddos.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - advanced_ddos = response.parse() - assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, 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 `zone_id` but received ''"): - client.zones.settings.advanced_ddos.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncAdvancedDDoS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - advanced_ddos = await async_client.zones.settings.advanced_ddos.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.advanced_ddos.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - advanced_ddos = await response.parse() - assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.advanced_ddos.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - advanced_ddos = await response.parse() - assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, 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 `zone_id` but received ''"): - await async_client.zones.settings.advanced_ddos.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_always_online.py b/tests/api_resources/zones/settings/test_always_online.py deleted file mode 100644 index 3f2165813c2..00000000000 --- a/tests/api_resources/zones/settings/test_always_online.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import AlwaysOnline - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAlwaysOnline: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - always_online = client.zones.settings.always_online.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.always_online.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_online = response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.always_online.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_online = response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, 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.zones.settings.always_online.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - always_online = client.zones.settings.always_online.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.always_online.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_online = response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.always_online.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_online = response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, 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 `zone_id` but received ''"): - client.zones.settings.always_online.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncAlwaysOnline: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - always_online = await async_client.zones.settings.always_online.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.always_online.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_online = await response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.always_online.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_online = await response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, 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.zones.settings.always_online.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - always_online = await async_client.zones.settings.always_online.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.always_online.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_online = await response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.always_online.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_online = await response.parse() - assert_matches_type(Optional[AlwaysOnline], always_online, 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 `zone_id` but received ''"): - await async_client.zones.settings.always_online.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_always_use_https.py b/tests/api_resources/zones/settings/test_always_use_https.py deleted file mode 100644 index 3f800f69e91..00000000000 --- a/tests/api_resources/zones/settings/test_always_use_https.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import AlwaysUseHTTPS - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAlwaysUseHTTPS: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - always_use_https = client.zones.settings.always_use_https.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.always_use_https.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_use_https = response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.always_use_https.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_use_https = response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, 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.zones.settings.always_use_https.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - always_use_https = client.zones.settings.always_use_https.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.always_use_https.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_use_https = response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.always_use_https.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_use_https = response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, 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 `zone_id` but received ''"): - client.zones.settings.always_use_https.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncAlwaysUseHTTPS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - always_use_https = await async_client.zones.settings.always_use_https.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.always_use_https.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_use_https = await response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.always_use_https.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_use_https = await response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, 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.zones.settings.always_use_https.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - always_use_https = await async_client.zones.settings.always_use_https.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.always_use_https.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - always_use_https = await response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.always_use_https.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - always_use_https = await response.parse() - assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, 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 `zone_id` but received ''"): - await async_client.zones.settings.always_use_https.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_automatic_https_rewrites.py b/tests/api_resources/zones/settings/test_automatic_https_rewrites.py deleted file mode 100644 index 727e05ba67a..00000000000 --- a/tests/api_resources/zones/settings/test_automatic_https_rewrites.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import AutomaticHTTPSRewrites - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAutomaticHTTPSRewrites: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - automatic_https_rewrite = client.zones.settings.automatic_https_rewrites.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.automatic_https_rewrites.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_https_rewrite = response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.automatic_https_rewrites.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_https_rewrite = response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, 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.zones.settings.automatic_https_rewrites.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - automatic_https_rewrite = client.zones.settings.automatic_https_rewrites.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.automatic_https_rewrites.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_https_rewrite = response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.automatic_https_rewrites.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_https_rewrite = response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, 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 `zone_id` but received ''"): - client.zones.settings.automatic_https_rewrites.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncAutomaticHTTPSRewrites: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - automatic_https_rewrite = await async_client.zones.settings.automatic_https_rewrites.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.automatic_https_rewrites.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.automatic_https_rewrites.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, 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.zones.settings.automatic_https_rewrites.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - automatic_https_rewrite = await async_client.zones.settings.automatic_https_rewrites.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.automatic_https_rewrites.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.automatic_https_rewrites.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, 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 `zone_id` but received ''"): - await async_client.zones.settings.automatic_https_rewrites.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_automatic_platform_optimization.py b/tests/api_resources/zones/settings/test_automatic_platform_optimization.py deleted file mode 100644 index f642c020a35..00000000000 --- a/tests/api_resources/zones/settings/test_automatic_platform_optimization.py +++ /dev/null @@ -1,246 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import AutomaticPlatformOptimization - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAutomaticPlatformOptimization: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - automatic_platform_optimization = client.zones.settings.automatic_platform_optimization.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.automatic_platform_optimization.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_platform_optimization = response.parse() - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.automatic_platform_optimization.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_platform_optimization = response.parse() - assert_matches_type( - Optional[AutomaticPlatformOptimization], automatic_platform_optimization, 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.zones.settings.automatic_platform_optimization.with_raw_response.edit( - zone_id="", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - automatic_platform_optimization = client.zones.settings.automatic_platform_optimization.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.automatic_platform_optimization.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_platform_optimization = response.parse() - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.automatic_platform_optimization.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_platform_optimization = response.parse() - assert_matches_type( - Optional[AutomaticPlatformOptimization], automatic_platform_optimization, 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 `zone_id` but received ''"): - client.zones.settings.automatic_platform_optimization.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncAutomaticPlatformOptimization: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - automatic_platform_optimization = await async_client.zones.settings.automatic_platform_optimization.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.automatic_platform_optimization.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_platform_optimization = await response.parse() - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.automatic_platform_optimization.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_platform_optimization = await response.parse() - assert_matches_type( - Optional[AutomaticPlatformOptimization], automatic_platform_optimization, 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.zones.settings.automatic_platform_optimization.with_raw_response.edit( - zone_id="", - value={ - "cache_by_device_type": False, - "cf": True, - "enabled": True, - "hostnames": ["www.example.com", "example.com", "shop.example.com"], - "wordpress": True, - "wp_plugin": True, - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - automatic_platform_optimization = await async_client.zones.settings.automatic_platform_optimization.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.automatic_platform_optimization.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - automatic_platform_optimization = await response.parse() - assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.automatic_platform_optimization.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - automatic_platform_optimization = await response.parse() - assert_matches_type( - Optional[AutomaticPlatformOptimization], automatic_platform_optimization, 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 `zone_id` but received ''"): - await async_client.zones.settings.automatic_platform_optimization.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_brotli.py b/tests/api_resources/zones/settings/test_brotli.py deleted file mode 100644 index 692acd2ff7f..00000000000 --- a/tests/api_resources/zones/settings/test_brotli.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import Brotli - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestBrotli: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - brotli = client.zones.settings.brotli.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.brotli.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - brotli = response.parse() - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.brotli.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - brotli = response.parse() - assert_matches_type(Optional[Brotli], brotli, 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.zones.settings.brotli.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - brotli = client.zones.settings.brotli.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.brotli.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - brotli = response.parse() - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.brotli.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - brotli = response.parse() - assert_matches_type(Optional[Brotli], brotli, 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 `zone_id` but received ''"): - client.zones.settings.brotli.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncBrotli: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - brotli = await async_client.zones.settings.brotli.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.brotli.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - brotli = await response.parse() - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.brotli.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - brotli = await response.parse() - assert_matches_type(Optional[Brotli], brotli, 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.zones.settings.brotli.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - brotli = await async_client.zones.settings.brotli.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.brotli.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - brotli = await response.parse() - assert_matches_type(Optional[Brotli], brotli, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.brotli.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - brotli = await response.parse() - assert_matches_type(Optional[Brotli], brotli, 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 `zone_id` but received ''"): - await async_client.zones.settings.brotli.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_browser_cache_ttl.py b/tests/api_resources/zones/settings/test_browser_cache_ttl.py deleted file mode 100644 index b8bdfd7d4f3..00000000000 --- a/tests/api_resources/zones/settings/test_browser_cache_ttl.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import BrowserCacheTTL - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestBrowserCacheTTL: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - browser_cache_ttl = client.zones.settings.browser_cache_ttl.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=0, - ) - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.browser_cache_ttl.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=0, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_cache_ttl = response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.browser_cache_ttl.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=0, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_cache_ttl = response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, 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.zones.settings.browser_cache_ttl.with_raw_response.edit( - zone_id="", - value=0, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - browser_cache_ttl = client.zones.settings.browser_cache_ttl.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.browser_cache_ttl.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_cache_ttl = response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.browser_cache_ttl.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_cache_ttl = response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, 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 `zone_id` but received ''"): - client.zones.settings.browser_cache_ttl.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncBrowserCacheTTL: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - browser_cache_ttl = await async_client.zones.settings.browser_cache_ttl.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=0, - ) - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.browser_cache_ttl.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=0, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_cache_ttl = await response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.browser_cache_ttl.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=0, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_cache_ttl = await response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, 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.zones.settings.browser_cache_ttl.with_raw_response.edit( - zone_id="", - value=0, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - browser_cache_ttl = await async_client.zones.settings.browser_cache_ttl.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.browser_cache_ttl.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_cache_ttl = await response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.browser_cache_ttl.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_cache_ttl = await response.parse() - assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, 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 `zone_id` but received ''"): - await async_client.zones.settings.browser_cache_ttl.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_browser_check.py b/tests/api_resources/zones/settings/test_browser_check.py deleted file mode 100644 index 4f783e9ffb4..00000000000 --- a/tests/api_resources/zones/settings/test_browser_check.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import BrowserCheck - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestBrowserCheck: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - browser_check = client.zones.settings.browser_check.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.browser_check.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_check = response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.browser_check.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_check = response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, 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.zones.settings.browser_check.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - browser_check = client.zones.settings.browser_check.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.browser_check.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_check = response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.browser_check.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_check = response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, 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 `zone_id` but received ''"): - client.zones.settings.browser_check.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncBrowserCheck: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - browser_check = await async_client.zones.settings.browser_check.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.browser_check.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_check = await response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.browser_check.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_check = await response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, 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.zones.settings.browser_check.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - browser_check = await async_client.zones.settings.browser_check.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.browser_check.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - browser_check = await response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.browser_check.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - browser_check = await response.parse() - assert_matches_type(Optional[BrowserCheck], browser_check, 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 `zone_id` but received ''"): - await async_client.zones.settings.browser_check.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_cache_level.py b/tests/api_resources/zones/settings/test_cache_level.py deleted file mode 100644 index e9b5c0b6674..00000000000 --- a/tests/api_resources/zones/settings/test_cache_level.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import CacheLevel - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCacheLevel: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - cache_level = client.zones.settings.cache_level.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="aggressive", - ) - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.cache_level.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="aggressive", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cache_level = response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.cache_level.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="aggressive", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cache_level = response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, 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.zones.settings.cache_level.with_raw_response.edit( - zone_id="", - value="aggressive", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - cache_level = client.zones.settings.cache_level.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.cache_level.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cache_level = response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.cache_level.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cache_level = response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, 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 `zone_id` but received ''"): - client.zones.settings.cache_level.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncCacheLevel: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - cache_level = await async_client.zones.settings.cache_level.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="aggressive", - ) - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.cache_level.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="aggressive", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cache_level = await response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.cache_level.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="aggressive", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cache_level = await response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, 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.zones.settings.cache_level.with_raw_response.edit( - zone_id="", - value="aggressive", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - cache_level = await async_client.zones.settings.cache_level.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.cache_level.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cache_level = await response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.cache_level.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cache_level = await response.parse() - assert_matches_type(Optional[CacheLevel], cache_level, 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 `zone_id` but received ''"): - await async_client.zones.settings.cache_level.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_challenge_ttl.py b/tests/api_resources/zones/settings/test_challenge_ttl.py deleted file mode 100644 index 2a1b284b755..00000000000 --- a/tests/api_resources/zones/settings/test_challenge_ttl.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ChallengeTTL - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestChallengeTTL: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - challenge_ttl = client.zones.settings.challenge_ttl.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=300, - ) - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.challenge_ttl.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=300, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.challenge_ttl.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=300, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, 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.zones.settings.challenge_ttl.with_raw_response.edit( - zone_id="", - value=300, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - challenge_ttl = client.zones.settings.challenge_ttl.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.challenge_ttl.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.challenge_ttl.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, 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 `zone_id` but received ''"): - client.zones.settings.challenge_ttl.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncChallengeTTL: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - challenge_ttl = await async_client.zones.settings.challenge_ttl.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=300, - ) - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.challenge_ttl.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=300, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - challenge_ttl = await response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.challenge_ttl.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=300, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - challenge_ttl = await response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, 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.zones.settings.challenge_ttl.with_raw_response.edit( - zone_id="", - value=300, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - challenge_ttl = await async_client.zones.settings.challenge_ttl.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.challenge_ttl.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - challenge_ttl = await response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.challenge_ttl.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - challenge_ttl = await response.parse() - assert_matches_type(Optional[ChallengeTTL], challenge_ttl, 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 `zone_id` but received ''"): - await async_client.zones.settings.challenge_ttl.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_ciphers.py b/tests/api_resources/zones/settings/test_ciphers.py deleted file mode 100644 index 369f2870999..00000000000 --- a/tests/api_resources/zones/settings/test_ciphers.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import Ciphers - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCiphers: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - cipher = client.zones.settings.ciphers.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.ciphers.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cipher = response.parse() - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.ciphers.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cipher = response.parse() - assert_matches_type(Optional[Ciphers], cipher, 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.zones.settings.ciphers.with_raw_response.edit( - zone_id="", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - cipher = client.zones.settings.ciphers.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.ciphers.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cipher = response.parse() - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.ciphers.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cipher = response.parse() - assert_matches_type(Optional[Ciphers], cipher, 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 `zone_id` but received ''"): - client.zones.settings.ciphers.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncCiphers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - cipher = await async_client.zones.settings.ciphers.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ciphers.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cipher = await response.parse() - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ciphers.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cipher = await response.parse() - assert_matches_type(Optional[Ciphers], cipher, 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.zones.settings.ciphers.with_raw_response.edit( - zone_id="", - value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - cipher = await async_client.zones.settings.ciphers.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ciphers.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cipher = await response.parse() - assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ciphers.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cipher = await response.parse() - assert_matches_type(Optional[Ciphers], cipher, 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 `zone_id` but received ''"): - await async_client.zones.settings.ciphers.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_development_mode.py b/tests/api_resources/zones/settings/test_development_mode.py deleted file mode 100644 index c0dcd89d40f..00000000000 --- a/tests/api_resources/zones/settings/test_development_mode.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import DevelopmentMode - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestDevelopmentMode: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - development_mode = client.zones.settings.development_mode.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.development_mode.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - development_mode = response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.development_mode.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - development_mode = response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, 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.zones.settings.development_mode.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - development_mode = client.zones.settings.development_mode.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.development_mode.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - development_mode = response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.development_mode.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - development_mode = response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, 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 `zone_id` but received ''"): - client.zones.settings.development_mode.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncDevelopmentMode: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - development_mode = await async_client.zones.settings.development_mode.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.development_mode.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - development_mode = await response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.development_mode.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - development_mode = await response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, 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.zones.settings.development_mode.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - development_mode = await async_client.zones.settings.development_mode.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.development_mode.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - development_mode = await response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.development_mode.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - development_mode = await response.parse() - assert_matches_type(Optional[DevelopmentMode], development_mode, 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 `zone_id` but received ''"): - await async_client.zones.settings.development_mode.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_early_hints.py b/tests/api_resources/zones/settings/test_early_hints.py deleted file mode 100644 index a7979ce0e77..00000000000 --- a/tests/api_resources/zones/settings/test_early_hints.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import EarlyHints - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestEarlyHints: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - early_hint = client.zones.settings.early_hints.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.early_hints.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - early_hint = response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.early_hints.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - early_hint = response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, 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.zones.settings.early_hints.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - early_hint = client.zones.settings.early_hints.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.early_hints.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - early_hint = response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.early_hints.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - early_hint = response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, 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 `zone_id` but received ''"): - client.zones.settings.early_hints.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncEarlyHints: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - early_hint = await async_client.zones.settings.early_hints.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.early_hints.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - early_hint = await response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.early_hints.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - early_hint = await response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, 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.zones.settings.early_hints.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - early_hint = await async_client.zones.settings.early_hints.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.early_hints.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - early_hint = await response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.early_hints.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - early_hint = await response.parse() - assert_matches_type(Optional[EarlyHints], early_hint, 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 `zone_id` but received ''"): - await async_client.zones.settings.early_hints.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_email_obfuscation.py b/tests/api_resources/zones/settings/test_email_obfuscation.py deleted file mode 100644 index c9ef6769ae1..00000000000 --- a/tests/api_resources/zones/settings/test_email_obfuscation.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import EmailObfuscation - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestEmailObfuscation: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - email_obfuscation = client.zones.settings.email_obfuscation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.email_obfuscation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.email_obfuscation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, 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.zones.settings.email_obfuscation.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - email_obfuscation = client.zones.settings.email_obfuscation.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.email_obfuscation.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.email_obfuscation.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, 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 `zone_id` but received ''"): - client.zones.settings.email_obfuscation.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncEmailObfuscation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - email_obfuscation = await async_client.zones.settings.email_obfuscation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.email_obfuscation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - email_obfuscation = await response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.email_obfuscation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - email_obfuscation = await response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, 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.zones.settings.email_obfuscation.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - email_obfuscation = await async_client.zones.settings.email_obfuscation.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.email_obfuscation.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - email_obfuscation = await response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.email_obfuscation.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - email_obfuscation = await response.parse() - assert_matches_type(Optional[EmailObfuscation], email_obfuscation, 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 `zone_id` but received ''"): - await async_client.zones.settings.email_obfuscation.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_h2_prioritization.py b/tests/api_resources/zones/settings/test_h2_prioritization.py deleted file mode 100644 index 2500447e342..00000000000 --- a/tests/api_resources/zones/settings/test_h2_prioritization.py +++ /dev/null @@ -1,228 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import H2Prioritization - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestH2Prioritization: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - h2_prioritization = client.zones.settings.h2_prioritization.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - h2_prioritization = client.zones.settings.h2_prioritization.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.h2_prioritization.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - h2_prioritization = response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.h2_prioritization.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - h2_prioritization = response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, 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.zones.settings.h2_prioritization.with_raw_response.edit( - zone_id="", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - h2_prioritization = client.zones.settings.h2_prioritization.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.h2_prioritization.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - h2_prioritization = response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.h2_prioritization.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - h2_prioritization = response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, 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 `zone_id` but received ''"): - client.zones.settings.h2_prioritization.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncH2Prioritization: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - h2_prioritization = await async_client.zones.settings.h2_prioritization.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - h2_prioritization = await async_client.zones.settings.h2_prioritization.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.h2_prioritization.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - h2_prioritization = await response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.h2_prioritization.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - h2_prioritization = await response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, 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.zones.settings.h2_prioritization.with_raw_response.edit( - zone_id="", - value={ - "id": "h2_prioritization", - "value": "on", - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - h2_prioritization = await async_client.zones.settings.h2_prioritization.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.h2_prioritization.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - h2_prioritization = await response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.h2_prioritization.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - h2_prioritization = await response.parse() - assert_matches_type(Optional[H2Prioritization], h2_prioritization, 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 `zone_id` but received ''"): - await async_client.zones.settings.h2_prioritization.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_hotlink_protection.py b/tests/api_resources/zones/settings/test_hotlink_protection.py deleted file mode 100644 index 8c077ae9b8f..00000000000 --- a/tests/api_resources/zones/settings/test_hotlink_protection.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import HotlinkProtection - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestHotlinkProtection: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - hotlink_protection = client.zones.settings.hotlink_protection.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.hotlink_protection.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.hotlink_protection.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, 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.zones.settings.hotlink_protection.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - hotlink_protection = client.zones.settings.hotlink_protection.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.hotlink_protection.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.hotlink_protection.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, 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 `zone_id` but received ''"): - client.zones.settings.hotlink_protection.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncHotlinkProtection: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - hotlink_protection = await async_client.zones.settings.hotlink_protection.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.hotlink_protection.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - hotlink_protection = await response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.hotlink_protection.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - hotlink_protection = await response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, 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.zones.settings.hotlink_protection.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - hotlink_protection = await async_client.zones.settings.hotlink_protection.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.hotlink_protection.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - hotlink_protection = await response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.hotlink_protection.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - hotlink_protection = await response.parse() - assert_matches_type(Optional[HotlinkProtection], hotlink_protection, 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 `zone_id` but received ''"): - await async_client.zones.settings.hotlink_protection.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_http2.py b/tests/api_resources/zones/settings/test_http2.py deleted file mode 100644 index 26aa47b9428..00000000000 --- a/tests/api_resources/zones/settings/test_http2.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import HTTP2 - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestHTTP2: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - http2 = client.zones.settings.http2.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.http2.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http2 = response.parse() - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.http2.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http2 = response.parse() - assert_matches_type(Optional[HTTP2], http2, 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.zones.settings.http2.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - http2 = client.zones.settings.http2.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.http2.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http2 = response.parse() - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.http2.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http2 = response.parse() - assert_matches_type(Optional[HTTP2], http2, 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 `zone_id` but received ''"): - client.zones.settings.http2.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncHTTP2: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - http2 = await async_client.zones.settings.http2.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.http2.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http2 = await response.parse() - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.http2.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http2 = await response.parse() - assert_matches_type(Optional[HTTP2], http2, 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.zones.settings.http2.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - http2 = await async_client.zones.settings.http2.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.http2.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http2 = await response.parse() - assert_matches_type(Optional[HTTP2], http2, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.http2.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http2 = await response.parse() - assert_matches_type(Optional[HTTP2], http2, 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 `zone_id` but received ''"): - await async_client.zones.settings.http2.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_http3.py b/tests/api_resources/zones/settings/test_http3.py deleted file mode 100644 index e30a60a4181..00000000000 --- a/tests/api_resources/zones/settings/test_http3.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import HTTP3 - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestHTTP3: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - http3 = client.zones.settings.http3.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.http3.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http3 = response.parse() - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.http3.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http3 = response.parse() - assert_matches_type(Optional[HTTP3], http3, 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.zones.settings.http3.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - http3 = client.zones.settings.http3.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.http3.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http3 = response.parse() - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.http3.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http3 = response.parse() - assert_matches_type(Optional[HTTP3], http3, 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 `zone_id` but received ''"): - client.zones.settings.http3.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncHTTP3: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - http3 = await async_client.zones.settings.http3.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.http3.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http3 = await response.parse() - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.http3.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http3 = await response.parse() - assert_matches_type(Optional[HTTP3], http3, 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.zones.settings.http3.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - http3 = await async_client.zones.settings.http3.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.http3.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - http3 = await response.parse() - assert_matches_type(Optional[HTTP3], http3, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.http3.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - http3 = await response.parse() - assert_matches_type(Optional[HTTP3], http3, 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 `zone_id` but received ''"): - await async_client.zones.settings.http3.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_image_resizing.py b/tests/api_resources/zones/settings/test_image_resizing.py deleted file mode 100644 index 6d81d767869..00000000000 --- a/tests/api_resources/zones/settings/test_image_resizing.py +++ /dev/null @@ -1,228 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ImageResizing - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestImageResizing: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - image_resizing = client.zones.settings.image_resizing.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - image_resizing = client.zones.settings.image_resizing.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.image_resizing.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - image_resizing = response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.image_resizing.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - image_resizing = response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, 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.zones.settings.image_resizing.with_raw_response.edit( - zone_id="", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - image_resizing = client.zones.settings.image_resizing.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.image_resizing.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - image_resizing = response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.image_resizing.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - image_resizing = response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, 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 `zone_id` but received ''"): - client.zones.settings.image_resizing.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncImageResizing: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - image_resizing = await async_client.zones.settings.image_resizing.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - image_resizing = await async_client.zones.settings.image_resizing.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.image_resizing.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - image_resizing = await response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.image_resizing.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "image_resizing", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - image_resizing = await response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, 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.zones.settings.image_resizing.with_raw_response.edit( - zone_id="", - value={ - "id": "image_resizing", - "value": "on", - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - image_resizing = await async_client.zones.settings.image_resizing.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.image_resizing.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - image_resizing = await response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.image_resizing.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - image_resizing = await response.parse() - assert_matches_type(Optional[ImageResizing], image_resizing, 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 `zone_id` but received ''"): - await async_client.zones.settings.image_resizing.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_ip_geolocation.py b/tests/api_resources/zones/settings/test_ip_geolocation.py deleted file mode 100644 index 20ff1c44111..00000000000 --- a/tests/api_resources/zones/settings/test_ip_geolocation.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import IPGeolocation - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestIPGeolocation: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - ip_geolocation = client.zones.settings.ip_geolocation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.ip_geolocation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.ip_geolocation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, 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.zones.settings.ip_geolocation.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - ip_geolocation = client.zones.settings.ip_geolocation.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.ip_geolocation.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.ip_geolocation.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, 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 `zone_id` but received ''"): - client.zones.settings.ip_geolocation.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncIPGeolocation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - ip_geolocation = await async_client.zones.settings.ip_geolocation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ip_geolocation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ip_geolocation = await response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ip_geolocation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ip_geolocation = await response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, 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.zones.settings.ip_geolocation.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - ip_geolocation = await async_client.zones.settings.ip_geolocation.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ip_geolocation.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ip_geolocation = await response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ip_geolocation.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ip_geolocation = await response.parse() - assert_matches_type(Optional[IPGeolocation], ip_geolocation, 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 `zone_id` but received ''"): - await async_client.zones.settings.ip_geolocation.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_ipv6.py b/tests/api_resources/zones/settings/test_ipv6.py deleted file mode 100644 index f2733ddfc77..00000000000 --- a/tests/api_resources/zones/settings/test_ipv6.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import IPV6 - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestIPV6: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - ipv6 = client.zones.settings.ipv6.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.ipv6.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipv6 = response.parse() - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.ipv6.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipv6 = response.parse() - assert_matches_type(Optional[IPV6], ipv6, 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.zones.settings.ipv6.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - ipv6 = client.zones.settings.ipv6.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.ipv6.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipv6 = response.parse() - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.ipv6.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipv6 = response.parse() - assert_matches_type(Optional[IPV6], ipv6, 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 `zone_id` but received ''"): - client.zones.settings.ipv6.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncIPV6: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - ipv6 = await async_client.zones.settings.ipv6.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ipv6.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipv6 = await response.parse() - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ipv6.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipv6 = await response.parse() - assert_matches_type(Optional[IPV6], ipv6, 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.zones.settings.ipv6.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - ipv6 = await async_client.zones.settings.ipv6.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ipv6.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipv6 = await response.parse() - assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ipv6.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipv6 = await response.parse() - assert_matches_type(Optional[IPV6], ipv6, 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 `zone_id` but received ''"): - await async_client.zones.settings.ipv6.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_min_tls_version.py b/tests/api_resources/zones/settings/test_min_tls_version.py deleted file mode 100644 index 043a46e0660..00000000000 --- a/tests/api_resources/zones/settings/test_min_tls_version.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import MinTLSVersion - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestMinTLSVersion: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - min_tls_version = client.zones.settings.min_tls_version.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="1.0", - ) - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.min_tls_version.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="1.0", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - min_tls_version = response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.min_tls_version.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="1.0", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - min_tls_version = response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, 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.zones.settings.min_tls_version.with_raw_response.edit( - zone_id="", - value="1.0", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - min_tls_version = client.zones.settings.min_tls_version.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.min_tls_version.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - min_tls_version = response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.min_tls_version.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - min_tls_version = response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, 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 `zone_id` but received ''"): - client.zones.settings.min_tls_version.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncMinTLSVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - min_tls_version = await async_client.zones.settings.min_tls_version.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="1.0", - ) - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.min_tls_version.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="1.0", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - min_tls_version = await response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.min_tls_version.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="1.0", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - min_tls_version = await response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, 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.zones.settings.min_tls_version.with_raw_response.edit( - zone_id="", - value="1.0", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - min_tls_version = await async_client.zones.settings.min_tls_version.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.min_tls_version.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - min_tls_version = await response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.min_tls_version.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - min_tls_version = await response.parse() - assert_matches_type(Optional[MinTLSVersion], min_tls_version, 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 `zone_id` but received ''"): - await async_client.zones.settings.min_tls_version.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_minify.py b/tests/api_resources/zones/settings/test_minify.py deleted file mode 100644 index fc2feb6e152..00000000000 --- a/tests/api_resources/zones/settings/test_minify.py +++ /dev/null @@ -1,206 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import Minify - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestMinify: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - minify = client.zones.settings.minify.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - minify = client.zones.settings.minify.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "css": "on", - "html": "on", - "js": "on", - }, - ) - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.minify.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - minify = response.parse() - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.minify.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - minify = response.parse() - assert_matches_type(Optional[Minify], minify, 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.zones.settings.minify.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - minify = client.zones.settings.minify.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.minify.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - minify = response.parse() - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.minify.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - minify = response.parse() - assert_matches_type(Optional[Minify], minify, 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 `zone_id` but received ''"): - client.zones.settings.minify.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncMinify: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - minify = await async_client.zones.settings.minify.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - minify = await async_client.zones.settings.minify.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "css": "on", - "html": "on", - "js": "on", - }, - ) - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.minify.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - minify = await response.parse() - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.minify.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - minify = await response.parse() - assert_matches_type(Optional[Minify], minify, 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.zones.settings.minify.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - minify = await async_client.zones.settings.minify.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.minify.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - minify = await response.parse() - assert_matches_type(Optional[Minify], minify, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.minify.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - minify = await response.parse() - assert_matches_type(Optional[Minify], minify, 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 `zone_id` but received ''"): - await async_client.zones.settings.minify.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_mirage.py b/tests/api_resources/zones/settings/test_mirage.py deleted file mode 100644 index 57f995c5ca0..00000000000 --- a/tests/api_resources/zones/settings/test_mirage.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import Mirage - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestMirage: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - mirage = client.zones.settings.mirage.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.mirage.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mirage = response.parse() - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.mirage.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mirage = response.parse() - assert_matches_type(Optional[Mirage], mirage, 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.zones.settings.mirage.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - mirage = client.zones.settings.mirage.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.mirage.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mirage = response.parse() - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.mirage.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mirage = response.parse() - assert_matches_type(Optional[Mirage], mirage, 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 `zone_id` but received ''"): - client.zones.settings.mirage.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncMirage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - mirage = await async_client.zones.settings.mirage.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.mirage.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mirage = await response.parse() - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.mirage.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mirage = await response.parse() - assert_matches_type(Optional[Mirage], mirage, 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.zones.settings.mirage.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - mirage = await async_client.zones.settings.mirage.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.mirage.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mirage = await response.parse() - assert_matches_type(Optional[Mirage], mirage, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.mirage.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mirage = await response.parse() - assert_matches_type(Optional[Mirage], mirage, 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 `zone_id` but received ''"): - await async_client.zones.settings.mirage.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_mobile_redirect.py b/tests/api_resources/zones/settings/test_mobile_redirect.py deleted file mode 100644 index b405bcd0582..00000000000 --- a/tests/api_resources/zones/settings/test_mobile_redirect.py +++ /dev/null @@ -1,206 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import MobileRedirect - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestMobileRedirect: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - mobile_redirect = client.zones.settings.mobile_redirect.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - mobile_redirect = client.zones.settings.mobile_redirect.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "mobile_subdomain": "m", - "status": "on", - "strip_uri": False, - }, - ) - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.mobile_redirect.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.mobile_redirect.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, 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.zones.settings.mobile_redirect.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - mobile_redirect = client.zones.settings.mobile_redirect.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.mobile_redirect.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.mobile_redirect.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, 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 `zone_id` but received ''"): - client.zones.settings.mobile_redirect.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncMobileRedirect: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - mobile_redirect = await async_client.zones.settings.mobile_redirect.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - mobile_redirect = await async_client.zones.settings.mobile_redirect.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "mobile_subdomain": "m", - "status": "on", - "strip_uri": False, - }, - ) - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.mobile_redirect.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mobile_redirect = await response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.mobile_redirect.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mobile_redirect = await response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, 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.zones.settings.mobile_redirect.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - mobile_redirect = await async_client.zones.settings.mobile_redirect.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.mobile_redirect.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - mobile_redirect = await response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.mobile_redirect.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - mobile_redirect = await response.parse() - assert_matches_type(Optional[MobileRedirect], mobile_redirect, 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 `zone_id` but received ''"): - await async_client.zones.settings.mobile_redirect.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_nel.py b/tests/api_resources/zones/settings/test_nel.py deleted file mode 100644 index e0e5f831a8f..00000000000 --- a/tests/api_resources/zones/settings/test_nel.py +++ /dev/null @@ -1,228 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import NEL - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestNEL: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - nel = client.zones.settings.nel.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {}, - }, - ) - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - nel = client.zones.settings.nel.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {"enabled": False}, - }, - ) - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.nel.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {}, - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - nel = response.parse() - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.nel.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {}, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - nel = response.parse() - assert_matches_type(Optional[NEL], nel, 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.zones.settings.nel.with_raw_response.edit( - zone_id="", - value={ - "id": "nel", - "value": {}, - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - nel = client.zones.settings.nel.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.nel.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - nel = response.parse() - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.nel.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - nel = response.parse() - assert_matches_type(Optional[NEL], nel, 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 `zone_id` but received ''"): - client.zones.settings.nel.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncNEL: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - nel = await async_client.zones.settings.nel.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {}, - }, - ) - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - nel = await async_client.zones.settings.nel.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {"enabled": False}, - }, - ) - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.nel.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {}, - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - nel = await response.parse() - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.nel.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "nel", - "value": {}, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - nel = await response.parse() - assert_matches_type(Optional[NEL], nel, 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.zones.settings.nel.with_raw_response.edit( - zone_id="", - value={ - "id": "nel", - "value": {}, - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - nel = await async_client.zones.settings.nel.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.nel.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - nel = await response.parse() - assert_matches_type(Optional[NEL], nel, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.nel.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - nel = await response.parse() - assert_matches_type(Optional[NEL], nel, 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 `zone_id` but received ''"): - await async_client.zones.settings.nel.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_opportunistic_encryption.py b/tests/api_resources/zones/settings/test_opportunistic_encryption.py deleted file mode 100644 index 41f4ff13934..00000000000 --- a/tests/api_resources/zones/settings/test_opportunistic_encryption.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import OpportunisticEncryption - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestOpportunisticEncryption: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - opportunistic_encryption = client.zones.settings.opportunistic_encryption.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.opportunistic_encryption.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_encryption = response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.opportunistic_encryption.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_encryption = response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, 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.zones.settings.opportunistic_encryption.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - opportunistic_encryption = client.zones.settings.opportunistic_encryption.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.opportunistic_encryption.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_encryption = response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.opportunistic_encryption.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_encryption = response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, 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 `zone_id` but received ''"): - client.zones.settings.opportunistic_encryption.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncOpportunisticEncryption: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - opportunistic_encryption = await async_client.zones.settings.opportunistic_encryption.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.opportunistic_encryption.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_encryption = await response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.opportunistic_encryption.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_encryption = await response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, 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.zones.settings.opportunistic_encryption.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - opportunistic_encryption = await async_client.zones.settings.opportunistic_encryption.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.opportunistic_encryption.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_encryption = await response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.opportunistic_encryption.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_encryption = await response.parse() - assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, 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 `zone_id` but received ''"): - await async_client.zones.settings.opportunistic_encryption.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_opportunistic_onion.py b/tests/api_resources/zones/settings/test_opportunistic_onion.py deleted file mode 100644 index 726c7245b59..00000000000 --- a/tests/api_resources/zones/settings/test_opportunistic_onion.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import OpportunisticOnion - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestOpportunisticOnion: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - opportunistic_onion = client.zones.settings.opportunistic_onion.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.opportunistic_onion.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.opportunistic_onion.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, 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.zones.settings.opportunistic_onion.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - opportunistic_onion = client.zones.settings.opportunistic_onion.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.opportunistic_onion.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.opportunistic_onion.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, 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 `zone_id` but received ''"): - client.zones.settings.opportunistic_onion.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncOpportunisticOnion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - opportunistic_onion = await async_client.zones.settings.opportunistic_onion.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.opportunistic_onion.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_onion = await response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.opportunistic_onion.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_onion = await response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, 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.zones.settings.opportunistic_onion.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - opportunistic_onion = await async_client.zones.settings.opportunistic_onion.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.opportunistic_onion.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - opportunistic_onion = await response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.opportunistic_onion.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - opportunistic_onion = await response.parse() - assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, 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 `zone_id` but received ''"): - await async_client.zones.settings.opportunistic_onion.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_orange_to_orange.py b/tests/api_resources/zones/settings/test_orange_to_orange.py deleted file mode 100644 index c96a6653f98..00000000000 --- a/tests/api_resources/zones/settings/test_orange_to_orange.py +++ /dev/null @@ -1,228 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import OrangeToOrange - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestOrangeToOrange: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - orange_to_orange = client.zones.settings.orange_to_orange.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - orange_to_orange = client.zones.settings.orange_to_orange.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.orange_to_orange.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - orange_to_orange = response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.orange_to_orange.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - orange_to_orange = response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, 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.zones.settings.orange_to_orange.with_raw_response.edit( - zone_id="", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - orange_to_orange = client.zones.settings.orange_to_orange.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.orange_to_orange.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - orange_to_orange = response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.orange_to_orange.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - orange_to_orange = response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, 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 `zone_id` but received ''"): - client.zones.settings.orange_to_orange.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncOrangeToOrange: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - orange_to_orange = await async_client.zones.settings.orange_to_orange.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - orange_to_orange = await async_client.zones.settings.orange_to_orange.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.orange_to_orange.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - orange_to_orange = await response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.orange_to_orange.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - orange_to_orange = await response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, 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.zones.settings.orange_to_orange.with_raw_response.edit( - zone_id="", - value={ - "id": "orange_to_orange", - "value": "on", - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - orange_to_orange = await async_client.zones.settings.orange_to_orange.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.orange_to_orange.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - orange_to_orange = await response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.orange_to_orange.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - orange_to_orange = await response.parse() - assert_matches_type(Optional[OrangeToOrange], orange_to_orange, 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 `zone_id` but received ''"): - await async_client.zones.settings.orange_to_orange.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py b/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py deleted file mode 100644 index 2b239031bc4..00000000000 --- a/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import OriginErrorPagePassThru - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestOriginErrorPagePassThru: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - origin_error_page_pass_thru = client.zones.settings.origin_error_page_pass_thru.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.origin_error_page_pass_thru.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.origin_error_page_pass_thru.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, 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.zones.settings.origin_error_page_pass_thru.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - origin_error_page_pass_thru = client.zones.settings.origin_error_page_pass_thru.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.origin_error_page_pass_thru.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.origin_error_page_pass_thru.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, 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 `zone_id` but received ''"): - client.zones.settings.origin_error_page_pass_thru.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncOriginErrorPagePassThru: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - origin_error_page_pass_thru = await async_client.zones.settings.origin_error_page_pass_thru.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.origin_error_page_pass_thru.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.origin_error_page_pass_thru.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, 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.zones.settings.origin_error_page_pass_thru.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - origin_error_page_pass_thru = await async_client.zones.settings.origin_error_page_pass_thru.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.origin_error_page_pass_thru.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.origin_error_page_pass_thru.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, 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 `zone_id` but received ''"): - await async_client.zones.settings.origin_error_page_pass_thru.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_polish.py b/tests/api_resources/zones/settings/test_polish.py deleted file mode 100644 index 8b465821171..00000000000 --- a/tests/api_resources/zones/settings/test_polish.py +++ /dev/null @@ -1,228 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import Polish - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestPolish: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - polish = client.zones.settings.polish.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - polish = client.zones.settings.polish.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.polish.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - polish = response.parse() - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.polish.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - polish = response.parse() - assert_matches_type(Optional[Polish], polish, 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.zones.settings.polish.with_raw_response.edit( - zone_id="", - value={ - "id": "polish", - "value": "off", - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - polish = client.zones.settings.polish.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.polish.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - polish = response.parse() - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.polish.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - polish = response.parse() - assert_matches_type(Optional[Polish], polish, 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 `zone_id` but received ''"): - client.zones.settings.polish.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncPolish: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - polish = await async_client.zones.settings.polish.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - polish = await async_client.zones.settings.polish.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.polish.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - polish = await response.parse() - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.polish.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "polish", - "value": "off", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - polish = await response.parse() - assert_matches_type(Optional[Polish], polish, 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.zones.settings.polish.with_raw_response.edit( - zone_id="", - value={ - "id": "polish", - "value": "off", - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - polish = await async_client.zones.settings.polish.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.polish.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - polish = await response.parse() - assert_matches_type(Optional[Polish], polish, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.polish.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - polish = await response.parse() - assert_matches_type(Optional[Polish], polish, 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 `zone_id` but received ''"): - await async_client.zones.settings.polish.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_prefetch_preload.py b/tests/api_resources/zones/settings/test_prefetch_preload.py deleted file mode 100644 index 274077451cc..00000000000 --- a/tests/api_resources/zones/settings/test_prefetch_preload.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import PrefetchPreload - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestPrefetchPreload: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - prefetch_preload = client.zones.settings.prefetch_preload.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.prefetch_preload.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.prefetch_preload.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, 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.zones.settings.prefetch_preload.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - prefetch_preload = client.zones.settings.prefetch_preload.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.prefetch_preload.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.prefetch_preload.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, 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 `zone_id` but received ''"): - client.zones.settings.prefetch_preload.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncPrefetchPreload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - prefetch_preload = await async_client.zones.settings.prefetch_preload.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.prefetch_preload.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - prefetch_preload = await response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.prefetch_preload.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - prefetch_preload = await response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, 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.zones.settings.prefetch_preload.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - prefetch_preload = await async_client.zones.settings.prefetch_preload.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.prefetch_preload.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - prefetch_preload = await response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.prefetch_preload.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - prefetch_preload = await response.parse() - assert_matches_type(Optional[PrefetchPreload], prefetch_preload, 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 `zone_id` but received ''"): - await async_client.zones.settings.prefetch_preload.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_proxy_read_timeout.py b/tests/api_resources/zones/settings/test_proxy_read_timeout.py deleted file mode 100644 index 0d77c45109d..00000000000 --- a/tests/api_resources/zones/settings/test_proxy_read_timeout.py +++ /dev/null @@ -1,228 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ProxyReadTimeout - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestProxyReadTimeout: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - proxy_read_timeout = client.zones.settings.proxy_read_timeout.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - proxy_read_timeout = client.zones.settings.proxy_read_timeout.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.proxy_read_timeout.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proxy_read_timeout = response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.proxy_read_timeout.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proxy_read_timeout = response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, 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.zones.settings.proxy_read_timeout.with_raw_response.edit( - zone_id="", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - proxy_read_timeout = client.zones.settings.proxy_read_timeout.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.proxy_read_timeout.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proxy_read_timeout = response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.proxy_read_timeout.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proxy_read_timeout = response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, 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 `zone_id` but received ''"): - client.zones.settings.proxy_read_timeout.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncProxyReadTimeout: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.proxy_read_timeout.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.proxy_read_timeout.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, 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.zones.settings.proxy_read_timeout.with_raw_response.edit( - zone_id="", - value={ - "id": "proxy_read_timeout", - "value": 0, - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.proxy_read_timeout.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.proxy_read_timeout.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, 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 `zone_id` but received ''"): - await async_client.zones.settings.proxy_read_timeout.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_pseudo_ipv4.py b/tests/api_resources/zones/settings/test_pseudo_ipv4.py deleted file mode 100644 index cec2b5def7d..00000000000 --- a/tests/api_resources/zones/settings/test_pseudo_ipv4.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import PseudoIPV4 - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestPseudoIPV4: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - pseudo_ipv4 = client.zones.settings.pseudo_ipv4.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.pseudo_ipv4.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.pseudo_ipv4.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, 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.zones.settings.pseudo_ipv4.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - pseudo_ipv4 = client.zones.settings.pseudo_ipv4.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.pseudo_ipv4.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.pseudo_ipv4.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, 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 `zone_id` but received ''"): - client.zones.settings.pseudo_ipv4.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncPseudoIPV4: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - pseudo_ipv4 = await async_client.zones.settings.pseudo_ipv4.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.pseudo_ipv4.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.pseudo_ipv4.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, 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.zones.settings.pseudo_ipv4.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - pseudo_ipv4 = await async_client.zones.settings.pseudo_ipv4.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.pseudo_ipv4.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.pseudo_ipv4.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, 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 `zone_id` but received ''"): - await async_client.zones.settings.pseudo_ipv4.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_response_buffering.py b/tests/api_resources/zones/settings/test_response_buffering.py deleted file mode 100644 index 9fd7a863594..00000000000 --- a/tests/api_resources/zones/settings/test_response_buffering.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ResponseBuffering - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestResponseBuffering: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - response_buffering = client.zones.settings.response_buffering.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.response_buffering.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - response_buffering = response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.response_buffering.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - response_buffering = response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, 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.zones.settings.response_buffering.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - response_buffering = client.zones.settings.response_buffering.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.response_buffering.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - response_buffering = response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.response_buffering.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - response_buffering = response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, 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 `zone_id` but received ''"): - client.zones.settings.response_buffering.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncResponseBuffering: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - response_buffering = await async_client.zones.settings.response_buffering.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.response_buffering.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - response_buffering = await response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.response_buffering.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - response_buffering = await response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, 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.zones.settings.response_buffering.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - response_buffering = await async_client.zones.settings.response_buffering.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.response_buffering.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - response_buffering = await response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.response_buffering.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - response_buffering = await response.parse() - assert_matches_type(Optional[ResponseBuffering], response_buffering, 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 `zone_id` but received ''"): - await async_client.zones.settings.response_buffering.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_rocket_loader.py b/tests/api_resources/zones/settings/test_rocket_loader.py deleted file mode 100644 index 1cf85e80da2..00000000000 --- a/tests/api_resources/zones/settings/test_rocket_loader.py +++ /dev/null @@ -1,228 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import RocketLoader - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestRocketLoader: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - rocket_loader = client.zones.settings.rocket_loader.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - rocket_loader = client.zones.settings.rocket_loader.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.rocket_loader.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.rocket_loader.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, 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.zones.settings.rocket_loader.with_raw_response.edit( - zone_id="", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - rocket_loader = client.zones.settings.rocket_loader.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.rocket_loader.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.rocket_loader.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, 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 `zone_id` but received ''"): - client.zones.settings.rocket_loader.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncRocketLoader: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - rocket_loader = await async_client.zones.settings.rocket_loader.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - rocket_loader = await async_client.zones.settings.rocket_loader.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.rocket_loader.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - rocket_loader = await response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.rocket_loader.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - rocket_loader = await response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, 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.zones.settings.rocket_loader.with_raw_response.edit( - zone_id="", - value={ - "id": "rocket_loader", - "value": "on", - }, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - rocket_loader = await async_client.zones.settings.rocket_loader.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.rocket_loader.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - rocket_loader = await response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.rocket_loader.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - rocket_loader = await response.parse() - assert_matches_type(Optional[RocketLoader], rocket_loader, 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 `zone_id` but received ''"): - await async_client.zones.settings.rocket_loader.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_security_headers.py b/tests/api_resources/zones/settings/test_security_headers.py deleted file mode 100644 index c6b2a4ca32d..00000000000 --- a/tests/api_resources/zones/settings/test_security_headers.py +++ /dev/null @@ -1,212 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import SecurityHeaders - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSecurityHeaders: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - security_header = client.zones.settings.security_headers.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - security_header = client.zones.settings.security_headers.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "strict_transport_security": { - "enabled": True, - "include_subdomains": True, - "max_age": 86400, - "nosniff": True, - } - }, - ) - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.security_headers.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_header = response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.security_headers.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_header = response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, 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.zones.settings.security_headers.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - security_header = client.zones.settings.security_headers.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.security_headers.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_header = response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.security_headers.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_header = response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, 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 `zone_id` but received ''"): - client.zones.settings.security_headers.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncSecurityHeaders: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - security_header = await async_client.zones.settings.security_headers.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - security_header = await async_client.zones.settings.security_headers.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "strict_transport_security": { - "enabled": True, - "include_subdomains": True, - "max_age": 86400, - "nosniff": True, - } - }, - ) - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.security_headers.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_header = await response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.security_headers.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_header = await response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, 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.zones.settings.security_headers.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - security_header = await async_client.zones.settings.security_headers.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.security_headers.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_header = await response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.security_headers.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_header = await response.parse() - assert_matches_type(Optional[SecurityHeaders], security_header, 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 `zone_id` but received ''"): - await async_client.zones.settings.security_headers.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_security_level.py b/tests/api_resources/zones/settings/test_security_level.py deleted file mode 100644 index 4fcd8c7f760..00000000000 --- a/tests/api_resources/zones/settings/test_security_level.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import SecurityLevel - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSecurityLevel: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - security_level = client.zones.settings.security_level.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.security_level.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_level = response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.security_level.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_level = response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, 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.zones.settings.security_level.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - security_level = client.zones.settings.security_level.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.security_level.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_level = response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.security_level.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_level = response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, 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 `zone_id` but received ''"): - client.zones.settings.security_level.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncSecurityLevel: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - security_level = await async_client.zones.settings.security_level.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.security_level.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_level = await response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.security_level.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_level = await response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, 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.zones.settings.security_level.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - security_level = await async_client.zones.settings.security_level.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.security_level.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - security_level = await response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.security_level.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - security_level = await response.parse() - assert_matches_type(Optional[SecurityLevel], security_level, 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 `zone_id` but received ''"): - await async_client.zones.settings.security_level.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_server_side_excludes.py b/tests/api_resources/zones/settings/test_server_side_excludes.py deleted file mode 100644 index f57a4aa6685..00000000000 --- a/tests/api_resources/zones/settings/test_server_side_excludes.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ServerSideExcludes - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestServerSideExcludes: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - server_side_exclude = client.zones.settings.server_side_excludes.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.server_side_excludes.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - server_side_exclude = response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.server_side_excludes.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - server_side_exclude = response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, 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.zones.settings.server_side_excludes.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - server_side_exclude = client.zones.settings.server_side_excludes.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.server_side_excludes.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - server_side_exclude = response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.server_side_excludes.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - server_side_exclude = response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, 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 `zone_id` but received ''"): - client.zones.settings.server_side_excludes.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncServerSideExcludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - server_side_exclude = await async_client.zones.settings.server_side_excludes.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.server_side_excludes.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - server_side_exclude = await response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.server_side_excludes.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - server_side_exclude = await response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, 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.zones.settings.server_side_excludes.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - server_side_exclude = await async_client.zones.settings.server_side_excludes.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.server_side_excludes.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - server_side_exclude = await response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.server_side_excludes.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - server_side_exclude = await response.parse() - assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, 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 `zone_id` but received ''"): - await async_client.zones.settings.server_side_excludes.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py b/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py deleted file mode 100644 index 99e3d2e9bcf..00000000000 --- a/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import SortQueryStringForCache - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSortQueryStringForCache: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - sort_query_string_for_cache = client.zones.settings.sort_query_string_for_cache.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.sort_query_string_for_cache.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.sort_query_string_for_cache.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, 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.zones.settings.sort_query_string_for_cache.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - sort_query_string_for_cache = client.zones.settings.sort_query_string_for_cache.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.sort_query_string_for_cache.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.sort_query_string_for_cache.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, 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 `zone_id` but received ''"): - client.zones.settings.sort_query_string_for_cache.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncSortQueryStringForCache: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - sort_query_string_for_cache = await async_client.zones.settings.sort_query_string_for_cache.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.sort_query_string_for_cache.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.sort_query_string_for_cache.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, 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.zones.settings.sort_query_string_for_cache.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - sort_query_string_for_cache = await async_client.zones.settings.sort_query_string_for_cache.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.sort_query_string_for_cache.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.sort_query_string_for_cache.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, 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 `zone_id` but received ''"): - await async_client.zones.settings.sort_query_string_for_cache.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_ssl.py b/tests/api_resources/zones/settings/test_ssl.py deleted file mode 100644 index 812f91087f4..00000000000 --- a/tests/api_resources/zones/settings/test_ssl.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import SSL - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSSL: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - ssl = client.zones.settings.ssl.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.ssl.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl = response.parse() - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.ssl.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl = response.parse() - assert_matches_type(Optional[SSL], ssl, 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.zones.settings.ssl.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - ssl = client.zones.settings.ssl.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.ssl.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl = response.parse() - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.ssl.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl = response.parse() - assert_matches_type(Optional[SSL], ssl, 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 `zone_id` but received ''"): - client.zones.settings.ssl.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncSSL: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - ssl = await async_client.zones.settings.ssl.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ssl.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl = await response.parse() - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ssl.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl = await response.parse() - assert_matches_type(Optional[SSL], ssl, 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.zones.settings.ssl.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - ssl = await async_client.zones.settings.ssl.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ssl.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl = await response.parse() - assert_matches_type(Optional[SSL], ssl, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ssl.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl = await response.parse() - assert_matches_type(Optional[SSL], ssl, 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 `zone_id` but received ''"): - await async_client.zones.settings.ssl.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_ssl_recommender.py b/tests/api_resources/zones/settings/test_ssl_recommender.py deleted file mode 100644 index ecda7d7ddff..00000000000 --- a/tests/api_resources/zones/settings/test_ssl_recommender.py +++ /dev/null @@ -1,204 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import SSLRecommender - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSSLRecommender: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - ssl_recommender = client.zones.settings.ssl_recommender.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - ssl_recommender = client.zones.settings.ssl_recommender.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "enabled": True, - "id": "ssl_recommender", - }, - ) - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.ssl_recommender.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.ssl_recommender.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, 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.zones.settings.ssl_recommender.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - ssl_recommender = client.zones.settings.ssl_recommender.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.ssl_recommender.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.ssl_recommender.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, 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 `zone_id` but received ''"): - client.zones.settings.ssl_recommender.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncSSLRecommender: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - ssl_recommender = await async_client.zones.settings.ssl_recommender.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - ssl_recommender = await async_client.zones.settings.ssl_recommender.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={ - "enabled": True, - "id": "ssl_recommender", - }, - ) - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ssl_recommender.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl_recommender = await response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ssl_recommender.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl_recommender = await response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, 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.zones.settings.ssl_recommender.with_raw_response.edit( - zone_id="", - value={}, - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - ssl_recommender = await async_client.zones.settings.ssl_recommender.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.ssl_recommender.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ssl_recommender = await response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.ssl_recommender.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ssl_recommender = await response.parse() - assert_matches_type(Optional[SSLRecommender], ssl_recommender, 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 `zone_id` but received ''"): - await async_client.zones.settings.ssl_recommender.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_tls_1_3.py b/tests/api_resources/zones/settings/test_tls_1_3.py deleted file mode 100644 index 1b0d4be49cf..00000000000 --- a/tests/api_resources/zones/settings/test_tls_1_3.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import TLS1_3 - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestTLS1_3: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - tls_1_3 = client.zones.settings.tls_1_3.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.tls_1_3.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_1_3 = response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.tls_1_3.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_1_3 = response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, 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.zones.settings.tls_1_3.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - tls_1_3 = client.zones.settings.tls_1_3.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.tls_1_3.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_1_3 = response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.tls_1_3.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_1_3 = response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, 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 `zone_id` but received ''"): - client.zones.settings.tls_1_3.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncTLS1_3: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - tls_1_3 = await async_client.zones.settings.tls_1_3.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.tls_1_3.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_1_3 = await response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.tls_1_3.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_1_3 = await response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, 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.zones.settings.tls_1_3.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - tls_1_3 = await async_client.zones.settings.tls_1_3.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.tls_1_3.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_1_3 = await response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.tls_1_3.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_1_3 = await response.parse() - assert_matches_type(Optional[TLS1_3], tls_1_3, 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 `zone_id` but received ''"): - await async_client.zones.settings.tls_1_3.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_tls_client_auth.py b/tests/api_resources/zones/settings/test_tls_client_auth.py deleted file mode 100644 index bb46f15a6cb..00000000000 --- a/tests/api_resources/zones/settings/test_tls_client_auth.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import TLSClientAuth - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestTLSClientAuth: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - tls_client_auth = client.zones.settings.tls_client_auth.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.tls_client_auth.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_client_auth = response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.tls_client_auth.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_client_auth = response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, 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.zones.settings.tls_client_auth.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - tls_client_auth = client.zones.settings.tls_client_auth.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.tls_client_auth.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_client_auth = response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.tls_client_auth.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_client_auth = response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, 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 `zone_id` but received ''"): - client.zones.settings.tls_client_auth.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncTLSClientAuth: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - tls_client_auth = await async_client.zones.settings.tls_client_auth.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.tls_client_auth.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_client_auth = await response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.tls_client_auth.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_client_auth = await response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, 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.zones.settings.tls_client_auth.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - tls_client_auth = await async_client.zones.settings.tls_client_auth.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.tls_client_auth.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - tls_client_auth = await response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.tls_client_auth.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - tls_client_auth = await response.parse() - assert_matches_type(Optional[TLSClientAuth], tls_client_auth, 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 `zone_id` but received ''"): - await async_client.zones.settings.tls_client_auth.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_true_client_ip_header.py b/tests/api_resources/zones/settings/test_true_client_ip_header.py deleted file mode 100644 index 0f412bb997c..00000000000 --- a/tests/api_resources/zones/settings/test_true_client_ip_header.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import TrueClientIPHeader - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestTrueClientIPHeader: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - true_client_ip_header = client.zones.settings.true_client_ip_header.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.true_client_ip_header.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - true_client_ip_header = response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.true_client_ip_header.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - true_client_ip_header = response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, 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.zones.settings.true_client_ip_header.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - true_client_ip_header = client.zones.settings.true_client_ip_header.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.true_client_ip_header.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - true_client_ip_header = response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.true_client_ip_header.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - true_client_ip_header = response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, 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 `zone_id` but received ''"): - client.zones.settings.true_client_ip_header.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncTrueClientIPHeader: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - true_client_ip_header = await async_client.zones.settings.true_client_ip_header.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.true_client_ip_header.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - true_client_ip_header = await response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.true_client_ip_header.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - true_client_ip_header = await response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, 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.zones.settings.true_client_ip_header.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - true_client_ip_header = await async_client.zones.settings.true_client_ip_header.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.true_client_ip_header.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - true_client_ip_header = await response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.true_client_ip_header.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - true_client_ip_header = await response.parse() - assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, 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 `zone_id` but received ''"): - await async_client.zones.settings.true_client_ip_header.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_waf.py b/tests/api_resources/zones/settings/test_waf.py deleted file mode 100644 index 954a0f04228..00000000000 --- a/tests/api_resources/zones/settings/test_waf.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import WAF - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestWAF: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - waf = client.zones.settings.waf.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.waf.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - waf = response.parse() - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.waf.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - waf = response.parse() - assert_matches_type(Optional[WAF], waf, 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.zones.settings.waf.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - waf = client.zones.settings.waf.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.waf.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - waf = response.parse() - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.waf.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - waf = response.parse() - assert_matches_type(Optional[WAF], waf, 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 `zone_id` but received ''"): - client.zones.settings.waf.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncWAF: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - waf = await async_client.zones.settings.waf.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.waf.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - waf = await response.parse() - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.waf.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - waf = await response.parse() - assert_matches_type(Optional[WAF], waf, 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.zones.settings.waf.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - waf = await async_client.zones.settings.waf.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.waf.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - waf = await response.parse() - assert_matches_type(Optional[WAF], waf, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.waf.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - waf = await response.parse() - assert_matches_type(Optional[WAF], waf, 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 `zone_id` but received ''"): - await async_client.zones.settings.waf.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_webp.py b/tests/api_resources/zones/settings/test_webp.py deleted file mode 100644 index 9595a35a1d0..00000000000 --- a/tests/api_resources/zones/settings/test_webp.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import WebP - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestWebP: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - webp = client.zones.settings.webp.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.webp.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - webp = response.parse() - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.webp.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - webp = response.parse() - assert_matches_type(Optional[WebP], webp, 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.zones.settings.webp.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - webp = client.zones.settings.webp.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.webp.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - webp = response.parse() - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.webp.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - webp = response.parse() - assert_matches_type(Optional[WebP], webp, 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 `zone_id` but received ''"): - client.zones.settings.webp.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncWebP: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - webp = await async_client.zones.settings.webp.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.webp.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - webp = await response.parse() - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.webp.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - webp = await response.parse() - assert_matches_type(Optional[WebP], webp, 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.zones.settings.webp.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - webp = await async_client.zones.settings.webp.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.webp.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - webp = await response.parse() - assert_matches_type(Optional[WebP], webp, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.webp.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - webp = await response.parse() - assert_matches_type(Optional[WebP], webp, 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 `zone_id` but received ''"): - await async_client.zones.settings.webp.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_websocket.py b/tests/api_resources/zones/settings/test_websocket.py deleted file mode 100644 index 6d51c9b1673..00000000000 --- a/tests/api_resources/zones/settings/test_websocket.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import Websocket - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestWebsocket: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - websocket = client.zones.settings.websocket.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.websocket.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - websocket = response.parse() - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.websocket.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - websocket = response.parse() - assert_matches_type(Optional[Websocket], websocket, 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.zones.settings.websocket.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - websocket = client.zones.settings.websocket.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.websocket.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - websocket = response.parse() - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.websocket.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - websocket = response.parse() - assert_matches_type(Optional[Websocket], websocket, 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 `zone_id` but received ''"): - client.zones.settings.websocket.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncWebsocket: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - websocket = await async_client.zones.settings.websocket.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.websocket.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - websocket = await response.parse() - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.websocket.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="off", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - websocket = await response.parse() - assert_matches_type(Optional[Websocket], websocket, 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.zones.settings.websocket.with_raw_response.edit( - zone_id="", - value="off", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - websocket = await async_client.zones.settings.websocket.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.websocket.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - websocket = await response.parse() - assert_matches_type(Optional[Websocket], websocket, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.websocket.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - websocket = await response.parse() - assert_matches_type(Optional[Websocket], websocket, 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 `zone_id` but received ''"): - await async_client.zones.settings.websocket.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_zero_rtt.py b/tests/api_resources/zones/settings/test_zero_rtt.py deleted file mode 100644 index 2901897e0d8..00000000000 --- a/tests/api_resources/zones/settings/test_zero_rtt.py +++ /dev/null @@ -1,182 +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, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZeroRTT - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestZeroRTT: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - zero_rtt = client.zones.settings.zero_rtt.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.zero_rtt.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.zero_rtt.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, 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.zones.settings.zero_rtt.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - zero_rtt = client.zones.settings.zero_rtt.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.zero_rtt.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.zero_rtt.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, 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 `zone_id` but received ''"): - client.zones.settings.zero_rtt.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncZeroRTT: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - zero_rtt = await async_client.zones.settings.zero_rtt.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.zero_rtt.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - zero_rtt = await response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.zero_rtt.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - zero_rtt = await response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, 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.zones.settings.zero_rtt.with_raw_response.edit( - zone_id="", - value="on", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - zero_rtt = await async_client.zones.settings.zero_rtt.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.zero_rtt.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - zero_rtt = await response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.zero_rtt.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - zero_rtt = await response.parse() - assert_matches_type(Optional[ZeroRTT], zero_rtt, 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 `zone_id` but received ''"): - await async_client.zones.settings.zero_rtt.with_raw_response.get( - zone_id="", - ) From f02688168e9ba3e5f70350e64d08d49dcbaef159 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 26 Jun 2024 17:23:01 +0000 Subject: [PATCH 016/316] 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 ed30724f8aa..12e2b6fafa5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dbe283789a3023e23b1cae66d3cd8f4bdde2422ce3e8d3f88c42bf8a0791e622.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4b5d09861a06c00be9bfe41e442a9ed48d4e0dca267ed70d7677ef78159ab997.yml From 4fc14538dc45b58059a84eb89afa4013be4fb0ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 20:14:34 +0000 Subject: [PATCH 017/316] feat(api): update via SDK Studio (#1146) --- .stats.yml | 2 +- api.md | 467 +++--------------- .../font_settings.py => settings.py} | 203 ++++---- .../resources/zones/settings/__init__.py | 47 -- .../zones/settings/origin_max_http_version.py | 285 ----------- .../resources/zones/settings/settings.py | 112 ----- src/cloudflare/resources/zones/zones.py | 1 - src/cloudflare/types/zones/__init__.py | 52 ++ .../zones/{settings => }/advanced_ddos.py | 2 +- .../zones/{settings => }/always_online.py | 2 +- .../zones/{settings => }/always_use_https.py | 2 +- .../automatic_https_rewrites.py | 2 +- .../automatic_platform_optimization.py | 2 +- .../types/zones/{settings => }/brotli.py | 2 +- .../zones/{settings => }/browser_cache_ttl.py | 2 +- .../zones/{settings => }/browser_check.py | 2 +- .../types/zones/{settings => }/cache_level.py | 2 +- .../zones/{settings => }/challenge_ttl.py | 2 +- .../types/zones/{settings => }/ciphers.py | 2 +- .../zones/{settings => }/development_mode.py | 2 +- .../types/zones/{settings => }/early_hints.py | 2 +- .../zones/{settings => }/email_obfuscation.py | 2 +- .../zones/{settings => }/h2_prioritization.py | 2 +- .../{settings => }/hotlink_protection.py | 2 +- .../types/zones/{settings => }/http2.py | 2 +- .../types/zones/{settings => }/http3.py | 2 +- .../zones/{settings => }/image_resizing.py | 2 +- .../zones/{settings => }/ip_geolocation.py | 2 +- .../types/zones/{settings => }/ipv6.py | 2 +- .../zones/{settings => }/min_tls_version.py | 2 +- .../types/zones/{settings => }/minify.py | 2 +- .../types/zones/{settings => }/mirage.py | 2 +- .../zones/{settings => }/mobile_redirect.py | 2 +- .../types/zones/{settings => }/nel.py | 2 +- .../opportunistic_encryption.py | 2 +- .../{settings => }/opportunistic_onion.py | 2 +- .../zones/{settings => }/orange_to_orange.py | 2 +- .../origin_error_page_pass_thru.py | 2 +- .../{settings => }/origin_max_http_version.py | 0 .../types/zones/{settings => }/polish.py | 2 +- .../zones/{settings => }/prefetch_preload.py | 2 +- .../{settings => }/proxy_read_timeout.py | 2 +- .../types/zones/{settings => }/pseudo_ipv4.py | 2 +- .../{settings => }/response_buffering.py | 2 +- .../zones/{settings => }/rocket_loader.py | 2 +- .../zones/{settings => }/security_headers.py | 2 +- .../zones/{settings => }/security_level.py | 2 +- .../{settings => }/server_side_excludes.py | 2 +- .../types/zones/setting_edit_response.py | 270 ++++++++++ .../types/zones/setting_get_response.py | 267 ++++++++++ .../types/zones/settings/__init__.py | 10 - .../settings/font_setting_edit_params.py | 15 - .../types/zones/settings/font_settings.py | 26 - .../origin_max_http_version_edit_params.py | 15 - .../origin_max_http_version_edit_response.py | 21 - .../origin_max_http_version_get_response.py | 21 - .../sort_query_string_for_cache.py | 2 +- .../types/zones/{settings => }/ssl.py | 2 +- .../zones/{settings => }/ssl_recommender.py | 2 +- .../types/zones/{settings => }/tls_1_3.py | 2 +- .../zones/{settings => }/tls_client_auth.py | 2 +- .../{settings => }/true_client_ip_header.py | 2 +- .../types/zones/{settings => }/waf.py | 2 +- .../types/zones/{settings => }/webp.py | 2 +- .../types/zones/{settings => }/websocket.py | 2 +- .../types/zones/{settings => }/zero_rtt.py | 2 +- .../api_resources/zones/settings/__init__.py | 1 - .../settings/test_origin_max_http_version.py | 185 ------- ...test_font_settings.py => test_settings.py} | 126 +++-- 69 files changed, 877 insertions(+), 1347 deletions(-) rename src/cloudflare/resources/zones/{settings/font_settings.py => settings.py} (51%) delete mode 100644 src/cloudflare/resources/zones/settings/__init__.py delete mode 100644 src/cloudflare/resources/zones/settings/origin_max_http_version.py delete mode 100644 src/cloudflare/resources/zones/settings/settings.py rename src/cloudflare/types/zones/{settings => }/advanced_ddos.py (95%) rename src/cloudflare/types/zones/{settings => }/always_online.py (95%) rename src/cloudflare/types/zones/{settings => }/always_use_https.py (95%) rename src/cloudflare/types/zones/{settings => }/automatic_https_rewrites.py (95%) rename src/cloudflare/types/zones/{settings => }/automatic_platform_optimization.py (96%) rename src/cloudflare/types/zones/{settings => }/brotli.py (94%) rename src/cloudflare/types/zones/{settings => }/browser_cache_ttl.py (96%) rename src/cloudflare/types/zones/{settings => }/browser_check.py (95%) rename src/cloudflare/types/zones/{settings => }/cache_level.py (95%) rename src/cloudflare/types/zones/{settings => }/challenge_ttl.py (95%) rename src/cloudflare/types/zones/{settings => }/ciphers.py (94%) rename src/cloudflare/types/zones/{settings => }/development_mode.py (96%) rename src/cloudflare/types/zones/{settings => }/early_hints.py (95%) rename src/cloudflare/types/zones/{settings => }/email_obfuscation.py (95%) rename src/cloudflare/types/zones/{settings => }/h2_prioritization.py (95%) rename src/cloudflare/types/zones/{settings => }/hotlink_protection.py (95%) rename src/cloudflare/types/zones/{settings => }/http2.py (94%) rename src/cloudflare/types/zones/{settings => }/http3.py (94%) rename src/cloudflare/types/zones/{settings => }/image_resizing.py (95%) rename src/cloudflare/types/zones/{settings => }/ip_geolocation.py (95%) rename src/cloudflare/types/zones/{settings => }/ipv6.py (94%) rename src/cloudflare/types/zones/{settings => }/min_tls_version.py (95%) rename src/cloudflare/types/zones/{settings => }/minify.py (96%) rename src/cloudflare/types/zones/{settings => }/mirage.py (94%) rename src/cloudflare/types/zones/{settings => }/mobile_redirect.py (97%) rename src/cloudflare/types/zones/{settings => }/nel.py (95%) rename src/cloudflare/types/zones/{settings => }/opportunistic_encryption.py (95%) rename src/cloudflare/types/zones/{settings => }/opportunistic_onion.py (95%) rename src/cloudflare/types/zones/{settings => }/orange_to_orange.py (95%) rename src/cloudflare/types/zones/{settings => }/origin_error_page_pass_thru.py (95%) rename src/cloudflare/types/zones/{settings => }/origin_max_http_version.py (100%) rename src/cloudflare/types/zones/{settings => }/polish.py (95%) rename src/cloudflare/types/zones/{settings => }/prefetch_preload.py (95%) rename src/cloudflare/types/zones/{settings => }/proxy_read_timeout.py (95%) rename src/cloudflare/types/zones/{settings => }/pseudo_ipv4.py (95%) rename src/cloudflare/types/zones/{settings => }/response_buffering.py (95%) rename src/cloudflare/types/zones/{settings => }/rocket_loader.py (95%) rename src/cloudflare/types/zones/{settings => }/security_headers.py (97%) rename src/cloudflare/types/zones/{settings => }/security_level.py (95%) rename src/cloudflare/types/zones/{settings => }/server_side_excludes.py (95%) create mode 100644 src/cloudflare/types/zones/setting_edit_response.py create mode 100644 src/cloudflare/types/zones/setting_get_response.py delete mode 100644 src/cloudflare/types/zones/settings/__init__.py delete mode 100644 src/cloudflare/types/zones/settings/font_setting_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/font_settings.py delete mode 100644 src/cloudflare/types/zones/settings/origin_max_http_version_edit_params.py delete mode 100644 src/cloudflare/types/zones/settings/origin_max_http_version_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/origin_max_http_version_get_response.py rename src/cloudflare/types/zones/{settings => }/sort_query_string_for_cache.py (95%) rename src/cloudflare/types/zones/{settings => }/ssl.py (95%) rename src/cloudflare/types/zones/{settings => }/ssl_recommender.py (92%) rename src/cloudflare/types/zones/{settings => }/tls_1_3.py (94%) rename src/cloudflare/types/zones/{settings => }/tls_client_auth.py (95%) rename src/cloudflare/types/zones/{settings => }/true_client_ip_header.py (95%) rename src/cloudflare/types/zones/{settings => }/waf.py (94%) rename src/cloudflare/types/zones/{settings => }/webp.py (94%) rename src/cloudflare/types/zones/{settings => }/websocket.py (95%) rename src/cloudflare/types/zones/{settings => }/zero_rtt.py (94%) delete mode 100644 tests/api_resources/zones/settings/__init__.py delete mode 100644 tests/api_resources/zones/settings/test_origin_max_http_version.py rename tests/api_resources/zones/{settings/test_font_settings.py => test_settings.py} (53%) diff --git a/.stats.yml b/.stats.yml index 12e2b6fafa5..c6fd4e3d54d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1256 +configured_endpoints: 1254 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4b5d09861a06c00be9bfe41e442a9ed48d4e0dca267ed70d7677ef78159ab997.yml diff --git a/api.md b/api.md index 4a571e0960a..f005ad1776f 100644 --- a/api.md +++ b/api.md @@ -307,427 +307,70 @@ Methods: ## Settings -### ZeroRTT - -Types: - -```python -from cloudflare.types.zones.settings import ZeroRTT -``` - -### AdvancedDDoS - -Types: - -```python -from cloudflare.types.zones.settings import AdvancedDDoS -``` - -### AlwaysOnline - -Types: - -```python -from cloudflare.types.zones.settings import AlwaysOnline -``` - -### AlwaysUseHTTPS - -Types: - -```python -from cloudflare.types.zones.settings import AlwaysUseHTTPS -``` - -### AutomaticHTTPSRewrites - -Types: - -```python -from cloudflare.types.zones.settings import AutomaticHTTPSRewrites -``` - -### AutomaticPlatformOptimization - -Types: - -```python -from cloudflare.types.zones.settings import AutomaticPlatformOptimization -``` - -### Brotli - -Types: - -```python -from cloudflare.types.zones.settings import Brotli -``` - -### BrowserCacheTTL - -Types: - -```python -from cloudflare.types.zones.settings import BrowserCacheTTL -``` - -### BrowserCheck - -Types: - -```python -from cloudflare.types.zones.settings import BrowserCheck -``` - -### CacheLevel - -Types: - -```python -from cloudflare.types.zones.settings import CacheLevel -``` - -### ChallengeTTL - -Types: - -```python -from cloudflare.types.zones.settings import ChallengeTTL -``` - -### Ciphers - -Types: - -```python -from cloudflare.types.zones.settings import Ciphers -``` - -### DevelopmentMode - -Types: - -```python -from cloudflare.types.zones.settings import DevelopmentMode -``` - -### EarlyHints - -Types: - -```python -from cloudflare.types.zones.settings import EarlyHints -``` - -### EmailObfuscation - -Types: - -```python -from cloudflare.types.zones.settings import EmailObfuscation -``` - -### H2Prioritization - -Types: - -```python -from cloudflare.types.zones.settings import H2Prioritization -``` - -### HotlinkProtection - -Types: - -```python -from cloudflare.types.zones.settings import HotlinkProtection -``` - -### HTTP2 - -Types: - -```python -from cloudflare.types.zones.settings import HTTP2 -``` - -### HTTP3 - -Types: - -```python -from cloudflare.types.zones.settings import HTTP3 -``` - -### ImageResizing - -Types: - -```python -from cloudflare.types.zones.settings import ImageResizing -``` - -### IPGeolocation - -Types: - -```python -from cloudflare.types.zones.settings import IPGeolocation -``` - -### IPV6 - -Types: - -```python -from cloudflare.types.zones.settings import IPV6 -``` - -### MinTLSVersion - -Types: - -```python -from cloudflare.types.zones.settings import MinTLSVersion -``` - -### Minify - -Types: - -```python -from cloudflare.types.zones.settings import Minify -``` - -### Mirage - -Types: - -```python -from cloudflare.types.zones.settings import Mirage -``` - -### MobileRedirect - -Types: - -```python -from cloudflare.types.zones.settings import MobileRedirect -``` - -### NEL - -Types: - -```python -from cloudflare.types.zones.settings import NEL -``` - -### OpportunisticEncryption - Types: ```python -from cloudflare.types.zones.settings import OpportunisticEncryption -``` - -### OpportunisticOnion - -Types: - -```python -from cloudflare.types.zones.settings import OpportunisticOnion -``` - -### OrangeToOrange - -Types: - -```python -from cloudflare.types.zones.settings import OrangeToOrange -``` - -### OriginErrorPagePassThru - -Types: - -```python -from cloudflare.types.zones.settings import OriginErrorPagePassThru -``` - -### OriginMaxHTTPVersion - -Types: - -```python -from cloudflare.types.zones.settings import ( +from cloudflare.types.zones import ( + AdvancedDDoS, + AlwaysOnline, + AlwaysUseHTTPS, + AutomaticHTTPSRewrites, + AutomaticPlatformOptimization, + Brotli, + BrowserCacheTTL, + BrowserCheck, + CacheLevel, + ChallengeTTL, + Ciphers, + DevelopmentMode, + EarlyHints, + EmailObfuscation, + FontSettings, + H2Prioritization, + HotlinkProtection, + HTTP2, + HTTP3, + ImageResizing, + IPGeolocation, + IPV6, + MinTLSVersion, + Minify, + Mirage, + MobileRedirect, + NEL, + OpportunisticEncryption, + OpportunisticOnion, + OrangeToOrange, + OriginErrorPagePassThru, OriginMaxHTTPVersion, - OriginMaxHTTPVersionEditResponse, - OriginMaxHTTPVersionGetResponse, + Polish, + PrefetchPreload, + ProxyReadTimeout, + PseudoIPV4, + ResponseBuffering, + RocketLoader, + SecurityHeaders, + SecurityLevel, + ServerSideExcludes, + SortQueryStringForCache, + SSL, + SSLRecommender, + TLS1_3, + TLSClientAuth, + TrueClientIPHeader, + WAF, + WebP, + Websocket, + ZeroRTT, + SettingEditResponse, + SettingGetResponse, ) ``` Methods: -- client.zones.settings.origin_max_http_version.edit(\*, zone_id, \*\*params) -> OriginMaxHTTPVersionEditResponse -- client.zones.settings.origin_max_http_version.get(\*, zone_id) -> OriginMaxHTTPVersionGetResponse - -### Polish - -Types: - -```python -from cloudflare.types.zones.settings import Polish -``` - -### PrefetchPreload - -Types: - -```python -from cloudflare.types.zones.settings import PrefetchPreload -``` - -### ProxyReadTimeout - -Types: - -```python -from cloudflare.types.zones.settings import ProxyReadTimeout -``` - -### PseudoIPV4 - -Types: - -```python -from cloudflare.types.zones.settings import PseudoIPV4 -``` - -### ResponseBuffering - -Types: - -```python -from cloudflare.types.zones.settings import ResponseBuffering -``` - -### RocketLoader - -Types: - -```python -from cloudflare.types.zones.settings import RocketLoader -``` - -### SecurityHeaders - -Types: - -```python -from cloudflare.types.zones.settings import SecurityHeaders -``` - -### SecurityLevel - -Types: - -```python -from cloudflare.types.zones.settings import SecurityLevel -``` - -### ServerSideExcludes - -Types: - -```python -from cloudflare.types.zones.settings import ServerSideExcludes -``` - -### SortQueryStringForCache - -Types: - -```python -from cloudflare.types.zones.settings import SortQueryStringForCache -``` - -### SSL - -Types: - -```python -from cloudflare.types.zones.settings import SSL -``` - -### SSLRecommender - -Types: - -```python -from cloudflare.types.zones.settings import SSLRecommender -``` - -### TLS1_3 - -Types: - -```python -from cloudflare.types.zones.settings import TLS1_3 -``` - -### TLSClientAuth - -Types: - -```python -from cloudflare.types.zones.settings import TLSClientAuth -``` - -### TrueClientIPHeader - -Types: - -```python -from cloudflare.types.zones.settings import TrueClientIPHeader -``` - -### WAF - -Types: - -```python -from cloudflare.types.zones.settings import WAF -``` - -### WebP - -Types: - -```python -from cloudflare.types.zones.settings import WebP -``` - -### Websocket - -Types: - -```python -from cloudflare.types.zones.settings import Websocket -``` - -### FontSettings - -Types: - -```python -from cloudflare.types.zones.settings import FontSettings -``` - -Methods: - -- client.zones.settings.font_settings.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.font_settings.get(\*, zone_id) -> Optional +- client.zones.settings.edit(setting_id, \*, zone_id) -> Optional +- client.zones.settings.get(setting_id, \*, zone_id) -> Optional ## CustomNameservers diff --git a/src/cloudflare/resources/zones/settings/font_settings.py b/src/cloudflare/resources/zones/settings.py similarity index 51% rename from src/cloudflare/resources/zones/settings/font_settings.py rename to src/cloudflare/resources/zones/settings.py index 6749ed07faa..480341ab1ce 100644 --- a/src/cloudflare/resources/zones/settings/font_settings.py +++ b/src/cloudflare/resources/zones/settings.py @@ -2,65 +2,57 @@ from __future__ import annotations -from typing import Type, Optional, cast -from typing_extensions import Literal +from typing import Any, 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 ( +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper -from ...._base_client import ( +from ..._wrappers import ResultWrapper +from ..._base_client import ( make_request_options, ) -from ....types.zones.settings import font_setting_edit_params -from ....types.zones.settings.font_settings import FontSettings +from ...types.zones.setting_get_response import SettingGetResponse +from ...types.zones.setting_edit_response import SettingEditResponse -__all__ = ["FontSettingsResource", "AsyncFontSettingsResource"] +__all__ = ["SettingsResource", "AsyncSettingsResource"] -class FontSettingsResource(SyncAPIResource): +class SettingsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> FontSettingsResourceWithRawResponse: - return FontSettingsResourceWithRawResponse(self) + def with_raw_response(self) -> SettingsResourceWithRawResponse: + return SettingsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> FontSettingsResourceWithStreamingResponse: - return FontSettingsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> SettingsResourceWithStreamingResponse: + return SettingsResourceWithStreamingResponse(self) def edit( self, + setting_id: str, *, zone_id: str, - value: Literal["on", "off"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[FontSettings]: - """Enhance your website's font delivery with Cloudflare Fonts. - - Deliver Google - Hosted fonts from your own domain, boost performance, and enhance user privacy. - Refer to the Cloudflare Fonts documentation for more information. + ) -> Optional[SettingEditResponse]: + """ + Updates a single zone setting by the identifier Args: zone_id: Identifier - value: Whether the feature is enabled or disabled. + setting_id: Setting name extra_headers: Send extra headers @@ -72,21 +64,23 @@ def edit( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not setting_id: + raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") return self._patch( - f"/zones/{zone_id}/settings/fonts", - body=maybe_transform({"value": value}, font_setting_edit_params.FontSettingEditParams), + f"/zones/{zone_id}/settings/{setting_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[FontSettings]]._unwrapper, + post_parser=ResultWrapper[Optional[SettingEditResponse]]._unwrapper, ), - cast_to=cast(Type[Optional[FontSettings]], ResultWrapper[FontSettings]), + cast_to=cast(Type[Optional[SettingEditResponse]], ResultWrapper[SettingEditResponse]), ) def get( self, + setting_id: str, *, zone_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -95,16 +89,15 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FontSettings]: - """Enhance your website's font delivery with Cloudflare Fonts. - - Deliver Google - Hosted fonts from your own domain, boost performance, and enhance user privacy. - Refer to the Cloudflare Fonts documentation for more information. + ) -> Optional[SettingGetResponse]: + """ + Fetch a single zone setting by name Args: zone_id: Identifier + setting_id: Setting name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -115,50 +108,54 @@ def get( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/fonts", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[FontSettings]]._unwrapper, + if not setting_id: + raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") + return cast( + Optional[SettingGetResponse], + self._get( + f"/zones/{zone_id}/settings/{setting_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SettingGetResponse]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[SettingGetResponse] + ), # Union types cannot be passed in as arguments in the type system ), - cast_to=cast(Type[Optional[FontSettings]], ResultWrapper[FontSettings]), ) -class AsyncFontSettingsResource(AsyncAPIResource): +class AsyncSettingsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncFontSettingsResourceWithRawResponse: - return AsyncFontSettingsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse: + return AsyncSettingsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncFontSettingsResourceWithStreamingResponse: - return AsyncFontSettingsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse: + return AsyncSettingsResourceWithStreamingResponse(self) async def edit( self, + setting_id: str, *, zone_id: str, - value: Literal["on", "off"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[FontSettings]: - """Enhance your website's font delivery with Cloudflare Fonts. - - Deliver Google - Hosted fonts from your own domain, boost performance, and enhance user privacy. - Refer to the Cloudflare Fonts documentation for more information. + ) -> Optional[SettingEditResponse]: + """ + Updates a single zone setting by the identifier Args: zone_id: Identifier - value: Whether the feature is enabled or disabled. + setting_id: Setting name extra_headers: Send extra headers @@ -170,21 +167,23 @@ async def edit( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not setting_id: + raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") return await self._patch( - f"/zones/{zone_id}/settings/fonts", - body=await async_maybe_transform({"value": value}, font_setting_edit_params.FontSettingEditParams), + f"/zones/{zone_id}/settings/{setting_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[FontSettings]]._unwrapper, + post_parser=ResultWrapper[Optional[SettingEditResponse]]._unwrapper, ), - cast_to=cast(Type[Optional[FontSettings]], ResultWrapper[FontSettings]), + cast_to=cast(Type[Optional[SettingEditResponse]], ResultWrapper[SettingEditResponse]), ) async def get( self, + setting_id: str, *, zone_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -193,16 +192,15 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FontSettings]: - """Enhance your website's font delivery with Cloudflare Fonts. - - Deliver Google - Hosted fonts from your own domain, boost performance, and enhance user privacy. - Refer to the Cloudflare Fonts documentation for more information. + ) -> Optional[SettingGetResponse]: + """ + Fetch a single zone setting by name Args: zone_id: Identifier + setting_id: Setting name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -213,62 +211,69 @@ async def get( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/fonts", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[FontSettings]]._unwrapper, + if not setting_id: + raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") + return cast( + Optional[SettingGetResponse], + await self._get( + f"/zones/{zone_id}/settings/{setting_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SettingGetResponse]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[SettingGetResponse] + ), # Union types cannot be passed in as arguments in the type system ), - cast_to=cast(Type[Optional[FontSettings]], ResultWrapper[FontSettings]), ) -class FontSettingsResourceWithRawResponse: - def __init__(self, font_settings: FontSettingsResource) -> None: - self._font_settings = font_settings +class SettingsResourceWithRawResponse: + def __init__(self, settings: SettingsResource) -> None: + self._settings = settings self.edit = to_raw_response_wrapper( - font_settings.edit, + settings.edit, ) self.get = to_raw_response_wrapper( - font_settings.get, + settings.get, ) -class AsyncFontSettingsResourceWithRawResponse: - def __init__(self, font_settings: AsyncFontSettingsResource) -> None: - self._font_settings = font_settings +class AsyncSettingsResourceWithRawResponse: + def __init__(self, settings: AsyncSettingsResource) -> None: + self._settings = settings self.edit = async_to_raw_response_wrapper( - font_settings.edit, + settings.edit, ) self.get = async_to_raw_response_wrapper( - font_settings.get, + settings.get, ) -class FontSettingsResourceWithStreamingResponse: - def __init__(self, font_settings: FontSettingsResource) -> None: - self._font_settings = font_settings +class SettingsResourceWithStreamingResponse: + def __init__(self, settings: SettingsResource) -> None: + self._settings = settings self.edit = to_streamed_response_wrapper( - font_settings.edit, + settings.edit, ) self.get = to_streamed_response_wrapper( - font_settings.get, + settings.get, ) -class AsyncFontSettingsResourceWithStreamingResponse: - def __init__(self, font_settings: AsyncFontSettingsResource) -> None: - self._font_settings = font_settings +class AsyncSettingsResourceWithStreamingResponse: + def __init__(self, settings: AsyncSettingsResource) -> None: + self._settings = settings self.edit = async_to_streamed_response_wrapper( - font_settings.edit, + settings.edit, ) self.get = async_to_streamed_response_wrapper( - font_settings.get, + settings.get, ) diff --git a/src/cloudflare/resources/zones/settings/__init__.py b/src/cloudflare/resources/zones/settings/__init__.py deleted file mode 100644 index ae9eeaf9d4a..00000000000 --- a/src/cloudflare/resources/zones/settings/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .settings import ( - SettingsResource, - AsyncSettingsResource, - SettingsResourceWithRawResponse, - AsyncSettingsResourceWithRawResponse, - SettingsResourceWithStreamingResponse, - AsyncSettingsResourceWithStreamingResponse, -) -from .font_settings import ( - FontSettingsResource, - AsyncFontSettingsResource, - FontSettingsResourceWithRawResponse, - AsyncFontSettingsResourceWithRawResponse, - FontSettingsResourceWithStreamingResponse, - AsyncFontSettingsResourceWithStreamingResponse, -) -from .origin_max_http_version import ( - OriginMaxHTTPVersionResource, - AsyncOriginMaxHTTPVersionResource, - OriginMaxHTTPVersionResourceWithRawResponse, - AsyncOriginMaxHTTPVersionResourceWithRawResponse, - OriginMaxHTTPVersionResourceWithStreamingResponse, - AsyncOriginMaxHTTPVersionResourceWithStreamingResponse, -) - -__all__ = [ - "OriginMaxHTTPVersionResource", - "AsyncOriginMaxHTTPVersionResource", - "OriginMaxHTTPVersionResourceWithRawResponse", - "AsyncOriginMaxHTTPVersionResourceWithRawResponse", - "OriginMaxHTTPVersionResourceWithStreamingResponse", - "AsyncOriginMaxHTTPVersionResourceWithStreamingResponse", - "FontSettingsResource", - "AsyncFontSettingsResource", - "FontSettingsResourceWithRawResponse", - "AsyncFontSettingsResourceWithRawResponse", - "FontSettingsResourceWithStreamingResponse", - "AsyncFontSettingsResourceWithStreamingResponse", - "SettingsResource", - "AsyncSettingsResource", - "SettingsResourceWithRawResponse", - "AsyncSettingsResourceWithRawResponse", - "SettingsResourceWithStreamingResponse", - "AsyncSettingsResourceWithStreamingResponse", -] diff --git a/src/cloudflare/resources/zones/settings/origin_max_http_version.py b/src/cloudflare/resources/zones/settings/origin_max_http_version.py deleted file mode 100644 index 29a7f3fff2a..00000000000 --- a/src/cloudflare/resources/zones/settings/origin_max_http_version.py +++ /dev/null @@ -1,285 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, cast -from typing_extensions import Literal - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.zones.settings import origin_max_http_version_edit_params -from ....types.zones.settings.origin_max_http_version_get_response import OriginMaxHTTPVersionGetResponse -from ....types.zones.settings.origin_max_http_version_edit_response import OriginMaxHTTPVersionEditResponse - -__all__ = ["OriginMaxHTTPVersionResource", "AsyncOriginMaxHTTPVersionResource"] - - -class OriginMaxHTTPVersionResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> OriginMaxHTTPVersionResourceWithRawResponse: - return OriginMaxHTTPVersionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> OriginMaxHTTPVersionResourceWithStreamingResponse: - return OriginMaxHTTPVersionResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - value: Literal["2", "1"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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, - ) -> OriginMaxHTTPVersionEditResponse: - """ - Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - requests to your origin. (Refer to - [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - for more information.). The default value is "2" for all plan types except ENT - where it is "1" - - Args: - zone_id: Identifier - - value: Value of the Origin Max HTTP Version Setting. - - 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}/settings/origin_max_http_version", - body=maybe_transform({"value": value}, origin_max_http_version_edit_params.OriginMaxHTTPVersionEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[OriginMaxHTTPVersionEditResponse]._unwrapper, - ), - cast_to=cast(Type[OriginMaxHTTPVersionEditResponse], ResultWrapper[OriginMaxHTTPVersionEditResponse]), - ) - - def get( - self, - *, - zone_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, - ) -> OriginMaxHTTPVersionGetResponse: - """ - Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - requests to your origin. (Refer to - [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - for more information.). The default value is "2" for all plan types except ENT - where it is "1" - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings/origin_max_http_version", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[OriginMaxHTTPVersionGetResponse]._unwrapper, - ), - cast_to=cast(Type[OriginMaxHTTPVersionGetResponse], ResultWrapper[OriginMaxHTTPVersionGetResponse]), - ) - - -class AsyncOriginMaxHTTPVersionResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncOriginMaxHTTPVersionResourceWithRawResponse: - return AsyncOriginMaxHTTPVersionResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncOriginMaxHTTPVersionResourceWithStreamingResponse: - return AsyncOriginMaxHTTPVersionResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - value: Literal["2", "1"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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, - ) -> OriginMaxHTTPVersionEditResponse: - """ - Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - requests to your origin. (Refer to - [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - for more information.). The default value is "2" for all plan types except ENT - where it is "1" - - Args: - zone_id: Identifier - - value: Value of the Origin Max HTTP Version Setting. - - 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}/settings/origin_max_http_version", - body=await async_maybe_transform( - {"value": value}, origin_max_http_version_edit_params.OriginMaxHTTPVersionEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[OriginMaxHTTPVersionEditResponse]._unwrapper, - ), - cast_to=cast(Type[OriginMaxHTTPVersionEditResponse], ResultWrapper[OriginMaxHTTPVersionEditResponse]), - ) - - async def get( - self, - *, - zone_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, - ) -> OriginMaxHTTPVersionGetResponse: - """ - Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - requests to your origin. (Refer to - [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - for more information.). The default value is "2" for all plan types except ENT - where it is "1" - - Args: - zone_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 zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings/origin_max_http_version", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[OriginMaxHTTPVersionGetResponse]._unwrapper, - ), - cast_to=cast(Type[OriginMaxHTTPVersionGetResponse], ResultWrapper[OriginMaxHTTPVersionGetResponse]), - ) - - -class OriginMaxHTTPVersionResourceWithRawResponse: - def __init__(self, origin_max_http_version: OriginMaxHTTPVersionResource) -> None: - self._origin_max_http_version = origin_max_http_version - - self.edit = to_raw_response_wrapper( - origin_max_http_version.edit, - ) - self.get = to_raw_response_wrapper( - origin_max_http_version.get, - ) - - -class AsyncOriginMaxHTTPVersionResourceWithRawResponse: - def __init__(self, origin_max_http_version: AsyncOriginMaxHTTPVersionResource) -> None: - self._origin_max_http_version = origin_max_http_version - - self.edit = async_to_raw_response_wrapper( - origin_max_http_version.edit, - ) - self.get = async_to_raw_response_wrapper( - origin_max_http_version.get, - ) - - -class OriginMaxHTTPVersionResourceWithStreamingResponse: - def __init__(self, origin_max_http_version: OriginMaxHTTPVersionResource) -> None: - self._origin_max_http_version = origin_max_http_version - - self.edit = to_streamed_response_wrapper( - origin_max_http_version.edit, - ) - self.get = to_streamed_response_wrapper( - origin_max_http_version.get, - ) - - -class AsyncOriginMaxHTTPVersionResourceWithStreamingResponse: - def __init__(self, origin_max_http_version: AsyncOriginMaxHTTPVersionResource) -> None: - self._origin_max_http_version = origin_max_http_version - - self.edit = async_to_streamed_response_wrapper( - origin_max_http_version.edit, - ) - self.get = async_to_streamed_response_wrapper( - origin_max_http_version.get, - ) diff --git a/src/cloudflare/resources/zones/settings/settings.py b/src/cloudflare/resources/zones/settings/settings.py deleted file mode 100644 index 48b3522b37e..00000000000 --- a/src/cloudflare/resources/zones/settings/settings.py +++ /dev/null @@ -1,112 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from .font_settings import ( - FontSettingsResource, - AsyncFontSettingsResource, - FontSettingsResourceWithRawResponse, - AsyncFontSettingsResourceWithRawResponse, - FontSettingsResourceWithStreamingResponse, - AsyncFontSettingsResourceWithStreamingResponse, -) -from .origin_max_http_version import ( - OriginMaxHTTPVersionResource, - AsyncOriginMaxHTTPVersionResource, - OriginMaxHTTPVersionResourceWithRawResponse, - AsyncOriginMaxHTTPVersionResourceWithRawResponse, - OriginMaxHTTPVersionResourceWithStreamingResponse, - AsyncOriginMaxHTTPVersionResourceWithStreamingResponse, -) - -__all__ = ["SettingsResource", "AsyncSettingsResource"] - - -class SettingsResource(SyncAPIResource): - @cached_property - def origin_max_http_version(self) -> OriginMaxHTTPVersionResource: - return OriginMaxHTTPVersionResource(self._client) - - @cached_property - def font_settings(self) -> FontSettingsResource: - return FontSettingsResource(self._client) - - @cached_property - def with_raw_response(self) -> SettingsResourceWithRawResponse: - return SettingsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> SettingsResourceWithStreamingResponse: - return SettingsResourceWithStreamingResponse(self) - - -class AsyncSettingsResource(AsyncAPIResource): - @cached_property - def origin_max_http_version(self) -> AsyncOriginMaxHTTPVersionResource: - return AsyncOriginMaxHTTPVersionResource(self._client) - - @cached_property - def font_settings(self) -> AsyncFontSettingsResource: - return AsyncFontSettingsResource(self._client) - - @cached_property - def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse: - return AsyncSettingsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse: - return AsyncSettingsResourceWithStreamingResponse(self) - - -class SettingsResourceWithRawResponse: - def __init__(self, settings: SettingsResource) -> None: - self._settings = settings - - @cached_property - def origin_max_http_version(self) -> OriginMaxHTTPVersionResourceWithRawResponse: - return OriginMaxHTTPVersionResourceWithRawResponse(self._settings.origin_max_http_version) - - @cached_property - def font_settings(self) -> FontSettingsResourceWithRawResponse: - return FontSettingsResourceWithRawResponse(self._settings.font_settings) - - -class AsyncSettingsResourceWithRawResponse: - def __init__(self, settings: AsyncSettingsResource) -> None: - self._settings = settings - - @cached_property - def origin_max_http_version(self) -> AsyncOriginMaxHTTPVersionResourceWithRawResponse: - return AsyncOriginMaxHTTPVersionResourceWithRawResponse(self._settings.origin_max_http_version) - - @cached_property - def font_settings(self) -> AsyncFontSettingsResourceWithRawResponse: - return AsyncFontSettingsResourceWithRawResponse(self._settings.font_settings) - - -class SettingsResourceWithStreamingResponse: - def __init__(self, settings: SettingsResource) -> None: - self._settings = settings - - @cached_property - def origin_max_http_version(self) -> OriginMaxHTTPVersionResourceWithStreamingResponse: - return OriginMaxHTTPVersionResourceWithStreamingResponse(self._settings.origin_max_http_version) - - @cached_property - def font_settings(self) -> FontSettingsResourceWithStreamingResponse: - return FontSettingsResourceWithStreamingResponse(self._settings.font_settings) - - -class AsyncSettingsResourceWithStreamingResponse: - def __init__(self, settings: AsyncSettingsResource) -> None: - self._settings = settings - - @cached_property - def origin_max_http_version(self) -> AsyncOriginMaxHTTPVersionResourceWithStreamingResponse: - return AsyncOriginMaxHTTPVersionResourceWithStreamingResponse(self._settings.origin_max_http_version) - - @cached_property - def font_settings(self) -> AsyncFontSettingsResourceWithStreamingResponse: - return AsyncFontSettingsResourceWithStreamingResponse(self._settings.font_settings) diff --git a/src/cloudflare/resources/zones/zones.py b/src/cloudflare/resources/zones/zones.py index 2584b9a48a9..03e2d448793 100644 --- a/src/cloudflare/resources/zones/zones.py +++ b/src/cloudflare/resources/zones/zones.py @@ -59,7 +59,6 @@ ActivationCheckResourceWithStreamingResponse, AsyncActivationCheckResourceWithStreamingResponse, ) -from .settings.settings import SettingsResource, AsyncSettingsResource from ...types.zones.type import Type as ZonesType from ...types.zones.zone import Zone from .custom_nameservers import ( diff --git a/src/cloudflare/types/zones/__init__.py b/src/cloudflare/types/zones/__init__.py index c7b972f4d45..bccc236417f 100644 --- a/src/cloudflare/types/zones/__init__.py +++ b/src/cloudflare/types/zones/__init__.py @@ -2,19 +2,71 @@ from __future__ import annotations +from .nel import NEL as NEL +from .ssl import SSL as SSL +from .waf import WAF as WAF +from .ipv6 import IPV6 as IPV6 from .type import Type as Type +from .webp import WebP as WebP from .zone import Zone as Zone +from .http2 import HTTP2 as HTTP2 +from .http3 import HTTP3 as HTTP3 +from .brotli import Brotli as Brotli +from .minify import Minify as Minify +from .mirage import Mirage as Mirage +from .polish import Polish as Polish +from .ciphers import Ciphers as Ciphers +from .tls_1_3 import TLS1_3 as TLS1_3 +from .zero_rtt import ZeroRTT as ZeroRTT +from .websocket import Websocket as Websocket from .zone_hold import ZoneHold as ZoneHold +from .cache_level import CacheLevel as CacheLevel +from .early_hints import EarlyHints as EarlyHints +from .pseudo_ipv4 import PseudoIPV4 as PseudoIPV4 +from .advanced_ddos import AdvancedDDoS as AdvancedDDoS +from .always_online import AlwaysOnline as AlwaysOnline +from .browser_check import BrowserCheck as BrowserCheck +from .challenge_ttl import ChallengeTTL as ChallengeTTL +from .rocket_loader import RocketLoader as RocketLoader +from .image_resizing import ImageResizing as ImageResizing +from .ip_geolocation import IPGeolocation as IPGeolocation +from .security_level import SecurityLevel as SecurityLevel +from .min_tls_version import MinTLSVersion as MinTLSVersion +from .mobile_redirect import MobileRedirect as MobileRedirect +from .ssl_recommender import SSLRecommender as SSLRecommender +from .tls_client_auth import TLSClientAuth as TLSClientAuth +from .always_use_https import AlwaysUseHTTPS as AlwaysUseHTTPS +from .development_mode import DevelopmentMode as DevelopmentMode +from .orange_to_orange import OrangeToOrange as OrangeToOrange +from .prefetch_preload import PrefetchPreload as PrefetchPreload +from .security_headers import SecurityHeaders as SecurityHeaders from .zone_edit_params import ZoneEditParams as ZoneEditParams from .zone_list_params import ZoneListParams as ZoneListParams +from .browser_cache_ttl import BrowserCacheTTL as BrowserCacheTTL +from .email_obfuscation import EmailObfuscation as EmailObfuscation +from .h2_prioritization import H2Prioritization as H2Prioritization from .hold_create_params import HoldCreateParams as HoldCreateParams from .hold_delete_params import HoldDeleteParams as HoldDeleteParams +from .hotlink_protection import HotlinkProtection as HotlinkProtection +from .proxy_read_timeout import ProxyReadTimeout as ProxyReadTimeout +from .response_buffering import ResponseBuffering as ResponseBuffering from .zone_create_params import ZoneCreateParams as ZoneCreateParams +from .opportunistic_onion import OpportunisticOnion as OpportunisticOnion +from .server_side_excludes import ServerSideExcludes as ServerSideExcludes +from .setting_get_response import SettingGetResponse as SettingGetResponse from .zone_delete_response import ZoneDeleteResponse as ZoneDeleteResponse +from .setting_edit_response import SettingEditResponse as SettingEditResponse +from .true_client_ip_header import TrueClientIPHeader as TrueClientIPHeader +from .origin_max_http_version import OriginMaxHTTPVersion as OriginMaxHTTPVersion +from .automatic_https_rewrites import AutomaticHTTPSRewrites as AutomaticHTTPSRewrites +from .opportunistic_encryption import OpportunisticEncryption as OpportunisticEncryption from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams +from .origin_error_page_pass_thru import OriginErrorPagePassThru as OriginErrorPagePassThru +from .sort_query_string_for_cache import SortQueryStringForCache as SortQueryStringForCache from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse from .custom_nameserver_get_response import CustomNameserverGetResponse as CustomNameserverGetResponse +from .automatic_platform_optimization import AutomaticPlatformOptimization as AutomaticPlatformOptimization from .custom_nameserver_update_params import CustomNameserverUpdateParams as CustomNameserverUpdateParams from .activation_check_trigger_response import ActivationCheckTriggerResponse as ActivationCheckTriggerResponse from .custom_nameserver_update_response import CustomNameserverUpdateResponse as CustomNameserverUpdateResponse diff --git a/src/cloudflare/types/zones/settings/advanced_ddos.py b/src/cloudflare/types/zones/advanced_ddos.py similarity index 95% rename from src/cloudflare/types/zones/settings/advanced_ddos.py rename to src/cloudflare/types/zones/advanced_ddos.py index b399aa5033b..f9fc9f46d39 100644 --- a/src/cloudflare/types/zones/settings/advanced_ddos.py +++ b/src/cloudflare/types/zones/advanced_ddos.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["AdvancedDDoS"] diff --git a/src/cloudflare/types/zones/settings/always_online.py b/src/cloudflare/types/zones/always_online.py similarity index 95% rename from src/cloudflare/types/zones/settings/always_online.py rename to src/cloudflare/types/zones/always_online.py index 8e6e3530c86..d37202571b6 100644 --- a/src/cloudflare/types/zones/settings/always_online.py +++ b/src/cloudflare/types/zones/always_online.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["AlwaysOnline"] diff --git a/src/cloudflare/types/zones/settings/always_use_https.py b/src/cloudflare/types/zones/always_use_https.py similarity index 95% rename from src/cloudflare/types/zones/settings/always_use_https.py rename to src/cloudflare/types/zones/always_use_https.py index 683e5f5f23c..78f176711aa 100644 --- a/src/cloudflare/types/zones/settings/always_use_https.py +++ b/src/cloudflare/types/zones/always_use_https.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["AlwaysUseHTTPS"] diff --git a/src/cloudflare/types/zones/settings/automatic_https_rewrites.py b/src/cloudflare/types/zones/automatic_https_rewrites.py similarity index 95% rename from src/cloudflare/types/zones/settings/automatic_https_rewrites.py rename to src/cloudflare/types/zones/automatic_https_rewrites.py index bc1d055b2c9..ced7a3e50f5 100644 --- a/src/cloudflare/types/zones/settings/automatic_https_rewrites.py +++ b/src/cloudflare/types/zones/automatic_https_rewrites.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["AutomaticHTTPSRewrites"] diff --git a/src/cloudflare/types/zones/settings/automatic_platform_optimization.py b/src/cloudflare/types/zones/automatic_platform_optimization.py similarity index 96% rename from src/cloudflare/types/zones/settings/automatic_platform_optimization.py rename to src/cloudflare/types/zones/automatic_platform_optimization.py index 1523e6d792d..dbf8d141501 100644 --- a/src/cloudflare/types/zones/settings/automatic_platform_optimization.py +++ b/src/cloudflare/types/zones/automatic_platform_optimization.py @@ -2,7 +2,7 @@ from typing import List -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["AutomaticPlatformOptimization"] diff --git a/src/cloudflare/types/zones/settings/brotli.py b/src/cloudflare/types/zones/brotli.py similarity index 94% rename from src/cloudflare/types/zones/settings/brotli.py rename to src/cloudflare/types/zones/brotli.py index b950810ee41..74f62f42deb 100644 --- a/src/cloudflare/types/zones/settings/brotli.py +++ b/src/cloudflare/types/zones/brotli.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["Brotli"] diff --git a/src/cloudflare/types/zones/settings/browser_cache_ttl.py b/src/cloudflare/types/zones/browser_cache_ttl.py similarity index 96% rename from src/cloudflare/types/zones/settings/browser_cache_ttl.py rename to src/cloudflare/types/zones/browser_cache_ttl.py index f24f141978c..77393c400dc 100644 --- a/src/cloudflare/types/zones/settings/browser_cache_ttl.py +++ b/src/cloudflare/types/zones/browser_cache_ttl.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["BrowserCacheTTL"] diff --git a/src/cloudflare/types/zones/settings/browser_check.py b/src/cloudflare/types/zones/browser_check.py similarity index 95% rename from src/cloudflare/types/zones/settings/browser_check.py rename to src/cloudflare/types/zones/browser_check.py index eadee65af2a..9de5013bcaa 100644 --- a/src/cloudflare/types/zones/settings/browser_check.py +++ b/src/cloudflare/types/zones/browser_check.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["BrowserCheck"] diff --git a/src/cloudflare/types/zones/settings/cache_level.py b/src/cloudflare/types/zones/cache_level.py similarity index 95% rename from src/cloudflare/types/zones/settings/cache_level.py rename to src/cloudflare/types/zones/cache_level.py index d383d1f6f60..7aaf4433499 100644 --- a/src/cloudflare/types/zones/settings/cache_level.py +++ b/src/cloudflare/types/zones/cache_level.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["CacheLevel"] diff --git a/src/cloudflare/types/zones/settings/challenge_ttl.py b/src/cloudflare/types/zones/challenge_ttl.py similarity index 95% rename from src/cloudflare/types/zones/settings/challenge_ttl.py rename to src/cloudflare/types/zones/challenge_ttl.py index 3006c3220d0..c7f1057d65b 100644 --- a/src/cloudflare/types/zones/settings/challenge_ttl.py +++ b/src/cloudflare/types/zones/challenge_ttl.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["ChallengeTTL"] diff --git a/src/cloudflare/types/zones/settings/ciphers.py b/src/cloudflare/types/zones/ciphers.py similarity index 94% rename from src/cloudflare/types/zones/settings/ciphers.py rename to src/cloudflare/types/zones/ciphers.py index a27c8eed620..90ac369b89d 100644 --- a/src/cloudflare/types/zones/settings/ciphers.py +++ b/src/cloudflare/types/zones/ciphers.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["Ciphers"] diff --git a/src/cloudflare/types/zones/settings/development_mode.py b/src/cloudflare/types/zones/development_mode.py similarity index 96% rename from src/cloudflare/types/zones/settings/development_mode.py rename to src/cloudflare/types/zones/development_mode.py index d5f856dd284..06c81d58b5f 100644 --- a/src/cloudflare/types/zones/settings/development_mode.py +++ b/src/cloudflare/types/zones/development_mode.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["DevelopmentMode"] diff --git a/src/cloudflare/types/zones/settings/early_hints.py b/src/cloudflare/types/zones/early_hints.py similarity index 95% rename from src/cloudflare/types/zones/settings/early_hints.py rename to src/cloudflare/types/zones/early_hints.py index db3e20a7e80..61b3e7421db 100644 --- a/src/cloudflare/types/zones/settings/early_hints.py +++ b/src/cloudflare/types/zones/early_hints.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["EarlyHints"] diff --git a/src/cloudflare/types/zones/settings/email_obfuscation.py b/src/cloudflare/types/zones/email_obfuscation.py similarity index 95% rename from src/cloudflare/types/zones/settings/email_obfuscation.py rename to src/cloudflare/types/zones/email_obfuscation.py index 278226136b5..37ecaca46de 100644 --- a/src/cloudflare/types/zones/settings/email_obfuscation.py +++ b/src/cloudflare/types/zones/email_obfuscation.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["EmailObfuscation"] diff --git a/src/cloudflare/types/zones/settings/h2_prioritization.py b/src/cloudflare/types/zones/h2_prioritization.py similarity index 95% rename from src/cloudflare/types/zones/settings/h2_prioritization.py rename to src/cloudflare/types/zones/h2_prioritization.py index 7a9144ae8b1..3efdb72b3e3 100644 --- a/src/cloudflare/types/zones/settings/h2_prioritization.py +++ b/src/cloudflare/types/zones/h2_prioritization.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["H2Prioritization"] diff --git a/src/cloudflare/types/zones/settings/hotlink_protection.py b/src/cloudflare/types/zones/hotlink_protection.py similarity index 95% rename from src/cloudflare/types/zones/settings/hotlink_protection.py rename to src/cloudflare/types/zones/hotlink_protection.py index 52fa412f29b..45d990193de 100644 --- a/src/cloudflare/types/zones/settings/hotlink_protection.py +++ b/src/cloudflare/types/zones/hotlink_protection.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["HotlinkProtection"] diff --git a/src/cloudflare/types/zones/settings/http2.py b/src/cloudflare/types/zones/http2.py similarity index 94% rename from src/cloudflare/types/zones/settings/http2.py rename to src/cloudflare/types/zones/http2.py index 8d539940248..2d959b2869f 100644 --- a/src/cloudflare/types/zones/settings/http2.py +++ b/src/cloudflare/types/zones/http2.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["HTTP2"] diff --git a/src/cloudflare/types/zones/settings/http3.py b/src/cloudflare/types/zones/http3.py similarity index 94% rename from src/cloudflare/types/zones/settings/http3.py rename to src/cloudflare/types/zones/http3.py index 2b65951e377..bfca8786793 100644 --- a/src/cloudflare/types/zones/settings/http3.py +++ b/src/cloudflare/types/zones/http3.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["HTTP3"] diff --git a/src/cloudflare/types/zones/settings/image_resizing.py b/src/cloudflare/types/zones/image_resizing.py similarity index 95% rename from src/cloudflare/types/zones/settings/image_resizing.py rename to src/cloudflare/types/zones/image_resizing.py index 8fa332009e7..5f4d4e370a6 100644 --- a/src/cloudflare/types/zones/settings/image_resizing.py +++ b/src/cloudflare/types/zones/image_resizing.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["ImageResizing"] diff --git a/src/cloudflare/types/zones/settings/ip_geolocation.py b/src/cloudflare/types/zones/ip_geolocation.py similarity index 95% rename from src/cloudflare/types/zones/settings/ip_geolocation.py rename to src/cloudflare/types/zones/ip_geolocation.py index faa0d44caec..0c378a4acc9 100644 --- a/src/cloudflare/types/zones/settings/ip_geolocation.py +++ b/src/cloudflare/types/zones/ip_geolocation.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["IPGeolocation"] diff --git a/src/cloudflare/types/zones/settings/ipv6.py b/src/cloudflare/types/zones/ipv6.py similarity index 94% rename from src/cloudflare/types/zones/settings/ipv6.py rename to src/cloudflare/types/zones/ipv6.py index d99f87c4568..3ba1ce89134 100644 --- a/src/cloudflare/types/zones/settings/ipv6.py +++ b/src/cloudflare/types/zones/ipv6.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["IPV6"] diff --git a/src/cloudflare/types/zones/settings/min_tls_version.py b/src/cloudflare/types/zones/min_tls_version.py similarity index 95% rename from src/cloudflare/types/zones/settings/min_tls_version.py rename to src/cloudflare/types/zones/min_tls_version.py index 20908024cda..107999e783e 100644 --- a/src/cloudflare/types/zones/settings/min_tls_version.py +++ b/src/cloudflare/types/zones/min_tls_version.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["MinTLSVersion"] diff --git a/src/cloudflare/types/zones/settings/minify.py b/src/cloudflare/types/zones/minify.py similarity index 96% rename from src/cloudflare/types/zones/settings/minify.py rename to src/cloudflare/types/zones/minify.py index eae119b2741..0d036564ca6 100644 --- a/src/cloudflare/types/zones/settings/minify.py +++ b/src/cloudflare/types/zones/minify.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["Minify", "Value"] diff --git a/src/cloudflare/types/zones/settings/mirage.py b/src/cloudflare/types/zones/mirage.py similarity index 94% rename from src/cloudflare/types/zones/settings/mirage.py rename to src/cloudflare/types/zones/mirage.py index bbd2722212e..4679cc48ebb 100644 --- a/src/cloudflare/types/zones/settings/mirage.py +++ b/src/cloudflare/types/zones/mirage.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["Mirage"] diff --git a/src/cloudflare/types/zones/settings/mobile_redirect.py b/src/cloudflare/types/zones/mobile_redirect.py similarity index 97% rename from src/cloudflare/types/zones/settings/mobile_redirect.py rename to src/cloudflare/types/zones/mobile_redirect.py index 1b6be5aa420..b787fbd3ed8 100644 --- a/src/cloudflare/types/zones/settings/mobile_redirect.py +++ b/src/cloudflare/types/zones/mobile_redirect.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["MobileRedirect", "Value"] diff --git a/src/cloudflare/types/zones/settings/nel.py b/src/cloudflare/types/zones/nel.py similarity index 95% rename from src/cloudflare/types/zones/settings/nel.py rename to src/cloudflare/types/zones/nel.py index f8b8d437e7e..bd87df59c8b 100644 --- a/src/cloudflare/types/zones/settings/nel.py +++ b/src/cloudflare/types/zones/nel.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["NEL", "Value"] diff --git a/src/cloudflare/types/zones/settings/opportunistic_encryption.py b/src/cloudflare/types/zones/opportunistic_encryption.py similarity index 95% rename from src/cloudflare/types/zones/settings/opportunistic_encryption.py rename to src/cloudflare/types/zones/opportunistic_encryption.py index 30ecc81168b..7ab0d1e8275 100644 --- a/src/cloudflare/types/zones/settings/opportunistic_encryption.py +++ b/src/cloudflare/types/zones/opportunistic_encryption.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["OpportunisticEncryption"] diff --git a/src/cloudflare/types/zones/settings/opportunistic_onion.py b/src/cloudflare/types/zones/opportunistic_onion.py similarity index 95% rename from src/cloudflare/types/zones/settings/opportunistic_onion.py rename to src/cloudflare/types/zones/opportunistic_onion.py index d0beb361768..533f547d0b2 100644 --- a/src/cloudflare/types/zones/settings/opportunistic_onion.py +++ b/src/cloudflare/types/zones/opportunistic_onion.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["OpportunisticOnion"] diff --git a/src/cloudflare/types/zones/settings/orange_to_orange.py b/src/cloudflare/types/zones/orange_to_orange.py similarity index 95% rename from src/cloudflare/types/zones/settings/orange_to_orange.py rename to src/cloudflare/types/zones/orange_to_orange.py index ae7a5cd519e..5605b38f011 100644 --- a/src/cloudflare/types/zones/settings/orange_to_orange.py +++ b/src/cloudflare/types/zones/orange_to_orange.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["OrangeToOrange"] diff --git a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru.py b/src/cloudflare/types/zones/origin_error_page_pass_thru.py similarity index 95% rename from src/cloudflare/types/zones/settings/origin_error_page_pass_thru.py rename to src/cloudflare/types/zones/origin_error_page_pass_thru.py index 000e5e4940e..24cd47f546b 100644 --- a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru.py +++ b/src/cloudflare/types/zones/origin_error_page_pass_thru.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["OriginErrorPagePassThru"] diff --git a/src/cloudflare/types/zones/settings/origin_max_http_version.py b/src/cloudflare/types/zones/origin_max_http_version.py similarity index 100% rename from src/cloudflare/types/zones/settings/origin_max_http_version.py rename to src/cloudflare/types/zones/origin_max_http_version.py diff --git a/src/cloudflare/types/zones/settings/polish.py b/src/cloudflare/types/zones/polish.py similarity index 95% rename from src/cloudflare/types/zones/settings/polish.py rename to src/cloudflare/types/zones/polish.py index 0caf6611eb3..c75f4c9c129 100644 --- a/src/cloudflare/types/zones/settings/polish.py +++ b/src/cloudflare/types/zones/polish.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["Polish"] diff --git a/src/cloudflare/types/zones/settings/prefetch_preload.py b/src/cloudflare/types/zones/prefetch_preload.py similarity index 95% rename from src/cloudflare/types/zones/settings/prefetch_preload.py rename to src/cloudflare/types/zones/prefetch_preload.py index 4482bee389c..38fba5db671 100644 --- a/src/cloudflare/types/zones/settings/prefetch_preload.py +++ b/src/cloudflare/types/zones/prefetch_preload.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["PrefetchPreload"] diff --git a/src/cloudflare/types/zones/settings/proxy_read_timeout.py b/src/cloudflare/types/zones/proxy_read_timeout.py similarity index 95% rename from src/cloudflare/types/zones/settings/proxy_read_timeout.py rename to src/cloudflare/types/zones/proxy_read_timeout.py index 1533eb571fe..4ebc5dc4228 100644 --- a/src/cloudflare/types/zones/settings/proxy_read_timeout.py +++ b/src/cloudflare/types/zones/proxy_read_timeout.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["ProxyReadTimeout"] diff --git a/src/cloudflare/types/zones/settings/pseudo_ipv4.py b/src/cloudflare/types/zones/pseudo_ipv4.py similarity index 95% rename from src/cloudflare/types/zones/settings/pseudo_ipv4.py rename to src/cloudflare/types/zones/pseudo_ipv4.py index d0e154d9ed6..7e8c5077722 100644 --- a/src/cloudflare/types/zones/settings/pseudo_ipv4.py +++ b/src/cloudflare/types/zones/pseudo_ipv4.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["PseudoIPV4"] diff --git a/src/cloudflare/types/zones/settings/response_buffering.py b/src/cloudflare/types/zones/response_buffering.py similarity index 95% rename from src/cloudflare/types/zones/settings/response_buffering.py rename to src/cloudflare/types/zones/response_buffering.py index 567acd1b665..cee36587e1a 100644 --- a/src/cloudflare/types/zones/settings/response_buffering.py +++ b/src/cloudflare/types/zones/response_buffering.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["ResponseBuffering"] diff --git a/src/cloudflare/types/zones/settings/rocket_loader.py b/src/cloudflare/types/zones/rocket_loader.py similarity index 95% rename from src/cloudflare/types/zones/settings/rocket_loader.py rename to src/cloudflare/types/zones/rocket_loader.py index 92374df7dd1..1fcbbd08bea 100644 --- a/src/cloudflare/types/zones/settings/rocket_loader.py +++ b/src/cloudflare/types/zones/rocket_loader.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["RocketLoader"] diff --git a/src/cloudflare/types/zones/settings/security_headers.py b/src/cloudflare/types/zones/security_headers.py similarity index 97% rename from src/cloudflare/types/zones/settings/security_headers.py rename to src/cloudflare/types/zones/security_headers.py index 2399ebe976c..c2ad2888bbb 100644 --- a/src/cloudflare/types/zones/settings/security_headers.py +++ b/src/cloudflare/types/zones/security_headers.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["SecurityHeaders", "Value", "ValueStrictTransportSecurity"] diff --git a/src/cloudflare/types/zones/settings/security_level.py b/src/cloudflare/types/zones/security_level.py similarity index 95% rename from src/cloudflare/types/zones/settings/security_level.py rename to src/cloudflare/types/zones/security_level.py index 36676d1e644..93dfddc12ef 100644 --- a/src/cloudflare/types/zones/settings/security_level.py +++ b/src/cloudflare/types/zones/security_level.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["SecurityLevel"] diff --git a/src/cloudflare/types/zones/settings/server_side_excludes.py b/src/cloudflare/types/zones/server_side_excludes.py similarity index 95% rename from src/cloudflare/types/zones/settings/server_side_excludes.py rename to src/cloudflare/types/zones/server_side_excludes.py index 96f3581d609..2630a01b631 100644 --- a/src/cloudflare/types/zones/settings/server_side_excludes.py +++ b/src/cloudflare/types/zones/server_side_excludes.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["ServerSideExcludes"] diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py new file mode 100644 index 00000000000..6806ed49d02 --- /dev/null +++ b/src/cloudflare/types/zones/setting_edit_response.py @@ -0,0 +1,270 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal + +from .nel import NEL +from .ssl import SSL +from .waf import WAF +from .ipv6 import IPV6 +from .webp import WebP +from .http2 import HTTP2 +from .http3 import HTTP3 +from .brotli import Brotli +from .minify import Minify +from .mirage import Mirage +from .polish import Polish +from .ciphers import Ciphers +from .tls_1_3 import TLS1_3 +from .zero_rtt import ZeroRTT +from ..._models import BaseModel +from .websocket import Websocket +from .cache_level import CacheLevel +from .early_hints import EarlyHints +from .pseudo_ipv4 import PseudoIPV4 +from .advanced_ddos import AdvancedDDoS +from .always_online import AlwaysOnline +from .browser_check import BrowserCheck +from .challenge_ttl import ChallengeTTL +from .rocket_loader import RocketLoader +from .image_resizing import ImageResizing +from .ip_geolocation import IPGeolocation +from .security_level import SecurityLevel +from .min_tls_version import MinTLSVersion +from .mobile_redirect import MobileRedirect +from .ssl_recommender import SSLRecommender +from .tls_client_auth import TLSClientAuth +from .always_use_https import AlwaysUseHTTPS +from .development_mode import DevelopmentMode +from .orange_to_orange import OrangeToOrange +from .prefetch_preload import PrefetchPreload +from .security_headers import SecurityHeaders +from .browser_cache_ttl import BrowserCacheTTL +from .email_obfuscation import EmailObfuscation +from .h2_prioritization import H2Prioritization +from .hotlink_protection import HotlinkProtection +from .proxy_read_timeout import ProxyReadTimeout +from .response_buffering import ResponseBuffering +from .opportunistic_onion import OpportunisticOnion +from .server_side_excludes import ServerSideExcludes +from .true_client_ip_header import TrueClientIPHeader +from .automatic_https_rewrites import AutomaticHTTPSRewrites +from .opportunistic_encryption import OpportunisticEncryption +from .origin_error_page_pass_thru import OriginErrorPagePassThru +from .sort_query_string_for_cache import SortQueryStringForCache +from .automatic_platform_optimization import AutomaticPlatformOptimization + +__all__ = [ + "SettingEditResponse", + "SettingEditResponseItem", + "SettingEditResponseItemZonesCNAMEFlattening", + "SettingEditResponseItemZonesEdgeCacheTTL", + "SettingEditResponseItemZonesMaxUpload", + "SettingEditResponseItemZonesReplaceInsecureJS", + "SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization", + "SettingEditResponseItemZonesSha1Support", + "SettingEditResponseItemZonesTLS1_2Only", +] + + +class SettingEditResponseItemZonesCNAMEFlattening(BaseModel): + id: Literal["cname_flattening"] + """How to flatten the cname destination.""" + + value: Literal["flatten_at_root", "flatten_all"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class SettingEditResponseItemZonesEdgeCacheTTL(BaseModel): + id: Literal["edge_cache_ttl"] + """ID of the zone setting.""" + + value: Literal[ + 30, + 60, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 518400, + 604800, + ] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class SettingEditResponseItemZonesMaxUpload(BaseModel): + id: Literal["max_upload"] + """identifier of the zone setting.""" + + value: Literal[100, 200, 500] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class SettingEditResponseItemZonesReplaceInsecureJS(BaseModel): + id: Literal["replace_insecure_js"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel): + id: Literal["automatic_platform_optimization"] + """ID of the zone setting.""" + + value: AutomaticPlatformOptimization + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class SettingEditResponseItemZonesSha1Support(BaseModel): + id: Literal["sha1_support"] + """Zone setting identifier.""" + + value: Literal["off", "on"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class SettingEditResponseItemZonesTLS1_2Only(BaseModel): + id: Literal["tls_1_2_only"] + """Zone setting identifier.""" + + value: Literal["off", "on"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +SettingEditResponseItem = Union[ + ZeroRTT, + AdvancedDDoS, + AlwaysOnline, + AlwaysUseHTTPS, + AutomaticHTTPSRewrites, + Brotli, + BrowserCacheTTL, + BrowserCheck, + CacheLevel, + ChallengeTTL, + Ciphers, + SettingEditResponseItemZonesCNAMEFlattening, + DevelopmentMode, + EarlyHints, + SettingEditResponseItemZonesEdgeCacheTTL, + EmailObfuscation, + H2Prioritization, + HotlinkProtection, + HTTP2, + HTTP3, + ImageResizing, + IPGeolocation, + IPV6, + SettingEditResponseItemZonesMaxUpload, + MinTLSVersion, + Minify, + Mirage, + MobileRedirect, + NEL, + OpportunisticEncryption, + OpportunisticOnion, + OrangeToOrange, + OriginErrorPagePassThru, + Polish, + PrefetchPreload, + ProxyReadTimeout, + PseudoIPV4, + SettingEditResponseItemZonesReplaceInsecureJS, + ResponseBuffering, + RocketLoader, + SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization, + SecurityHeaders, + SecurityLevel, + ServerSideExcludes, + SettingEditResponseItemZonesSha1Support, + SortQueryStringForCache, + SSL, + SSLRecommender, + SettingEditResponseItemZonesTLS1_2Only, + TLS1_3, + TLSClientAuth, + TrueClientIPHeader, + WAF, + WebP, + Websocket, +] + +SettingEditResponse = List[SettingEditResponseItem] diff --git a/src/cloudflare/types/zones/setting_get_response.py b/src/cloudflare/types/zones/setting_get_response.py new file mode 100644 index 00000000000..692ee89b86c --- /dev/null +++ b/src/cloudflare/types/zones/setting_get_response.py @@ -0,0 +1,267 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Union, Optional +from datetime import datetime +from typing_extensions import Literal + +from .nel import NEL +from .ssl import SSL +from .waf import WAF +from .ipv6 import IPV6 +from .webp import WebP +from .http2 import HTTP2 +from .http3 import HTTP3 +from .brotli import Brotli +from .minify import Minify +from .mirage import Mirage +from .polish import Polish +from .ciphers import Ciphers +from .tls_1_3 import TLS1_3 +from .zero_rtt import ZeroRTT +from ..._models import BaseModel +from .websocket import Websocket +from .cache_level import CacheLevel +from .early_hints import EarlyHints +from .pseudo_ipv4 import PseudoIPV4 +from .advanced_ddos import AdvancedDDoS +from .always_online import AlwaysOnline +from .browser_check import BrowserCheck +from .challenge_ttl import ChallengeTTL +from .rocket_loader import RocketLoader +from .image_resizing import ImageResizing +from .ip_geolocation import IPGeolocation +from .security_level import SecurityLevel +from .min_tls_version import MinTLSVersion +from .mobile_redirect import MobileRedirect +from .ssl_recommender import SSLRecommender +from .tls_client_auth import TLSClientAuth +from .always_use_https import AlwaysUseHTTPS +from .development_mode import DevelopmentMode +from .orange_to_orange import OrangeToOrange +from .prefetch_preload import PrefetchPreload +from .security_headers import SecurityHeaders +from .browser_cache_ttl import BrowserCacheTTL +from .email_obfuscation import EmailObfuscation +from .h2_prioritization import H2Prioritization +from .hotlink_protection import HotlinkProtection +from .proxy_read_timeout import ProxyReadTimeout +from .response_buffering import ResponseBuffering +from .opportunistic_onion import OpportunisticOnion +from .server_side_excludes import ServerSideExcludes +from .true_client_ip_header import TrueClientIPHeader +from .automatic_https_rewrites import AutomaticHTTPSRewrites +from .opportunistic_encryption import OpportunisticEncryption +from .origin_error_page_pass_thru import OriginErrorPagePassThru +from .sort_query_string_for_cache import SortQueryStringForCache +from .automatic_platform_optimization import AutomaticPlatformOptimization + +__all__ = [ + "SettingGetResponse", + "ZonesCNAMEFlattening", + "ZonesEdgeCacheTTL", + "ZonesMaxUpload", + "ZonesReplaceInsecureJS", + "ZonesSchemasAutomaticPlatformOptimization", + "ZonesSha1Support", + "ZonesTLS1_2Only", +] + + +class ZonesCNAMEFlattening(BaseModel): + id: Literal["cname_flattening"] + """How to flatten the cname destination.""" + + value: Literal["flatten_at_root", "flatten_all"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class ZonesEdgeCacheTTL(BaseModel): + id: Literal["edge_cache_ttl"] + """ID of the zone setting.""" + + value: Literal[ + 30, + 60, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 518400, + 604800, + ] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class ZonesMaxUpload(BaseModel): + id: Literal["max_upload"] + """identifier of the zone setting.""" + + value: Literal[100, 200, 500] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class ZonesReplaceInsecureJS(BaseModel): + id: Literal["replace_insecure_js"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class ZonesSchemasAutomaticPlatformOptimization(BaseModel): + id: Literal["automatic_platform_optimization"] + """ID of the zone setting.""" + + value: AutomaticPlatformOptimization + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class ZonesSha1Support(BaseModel): + id: Literal["sha1_support"] + """Zone setting identifier.""" + + value: Literal["off", "on"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +class ZonesTLS1_2Only(BaseModel): + id: Literal["tls_1_2_only"] + """Zone setting identifier.""" + + value: Literal["off", "on"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + +SettingGetResponse = Union[ + ZeroRTT, + AdvancedDDoS, + AlwaysOnline, + AlwaysUseHTTPS, + AutomaticHTTPSRewrites, + Brotli, + BrowserCacheTTL, + BrowserCheck, + CacheLevel, + ChallengeTTL, + Ciphers, + ZonesCNAMEFlattening, + DevelopmentMode, + EarlyHints, + ZonesEdgeCacheTTL, + EmailObfuscation, + H2Prioritization, + HotlinkProtection, + HTTP2, + HTTP3, + ImageResizing, + IPGeolocation, + IPV6, + ZonesMaxUpload, + MinTLSVersion, + Minify, + Mirage, + MobileRedirect, + NEL, + OpportunisticEncryption, + OpportunisticOnion, + OrangeToOrange, + OriginErrorPagePassThru, + Polish, + PrefetchPreload, + ProxyReadTimeout, + PseudoIPV4, + ZonesReplaceInsecureJS, + ResponseBuffering, + RocketLoader, + ZonesSchemasAutomaticPlatformOptimization, + SecurityHeaders, + SecurityLevel, + ServerSideExcludes, + ZonesSha1Support, + SortQueryStringForCache, + SSL, + SSLRecommender, + ZonesTLS1_2Only, + TLS1_3, + TLSClientAuth, + TrueClientIPHeader, + WAF, + WebP, + Websocket, +] diff --git a/src/cloudflare/types/zones/settings/__init__.py b/src/cloudflare/types/zones/settings/__init__.py deleted file mode 100644 index b44583a9742..00000000000 --- a/src/cloudflare/types/zones/settings/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .font_settings import FontSettings as FontSettings -from .origin_max_http_version import OriginMaxHTTPVersion as OriginMaxHTTPVersion -from .font_setting_edit_params import FontSettingEditParams as FontSettingEditParams -from .origin_max_http_version_edit_params import OriginMaxHTTPVersionEditParams as OriginMaxHTTPVersionEditParams -from .origin_max_http_version_get_response import OriginMaxHTTPVersionGetResponse as OriginMaxHTTPVersionGetResponse -from .origin_max_http_version_edit_response import OriginMaxHTTPVersionEditResponse as OriginMaxHTTPVersionEditResponse diff --git a/src/cloudflare/types/zones/settings/font_setting_edit_params.py b/src/cloudflare/types/zones/settings/font_setting_edit_params.py deleted file mode 100644 index 41953c2d872..00000000000 --- a/src/cloudflare/types/zones/settings/font_setting_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["FontSettingEditParams"] - - -class FontSettingEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["on", "off"]] - """Whether the feature is enabled or disabled.""" diff --git a/src/cloudflare/types/zones/settings/font_settings.py b/src/cloudflare/types/zones/settings/font_settings.py deleted file mode 100644 index c0fc9cdfac3..00000000000 --- a/src/cloudflare/types/zones/settings/font_settings.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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__ = ["FontSettings"] - - -class FontSettings(BaseModel): - id: Literal["fonts"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/origin_max_http_version_edit_params.py b/src/cloudflare/types/zones/settings/origin_max_http_version_edit_params.py deleted file mode 100644 index 9462bcaab09..00000000000 --- a/src/cloudflare/types/zones/settings/origin_max_http_version_edit_params.py +++ /dev/null @@ -1,15 +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__ = ["OriginMaxHTTPVersionEditParams"] - - -class OriginMaxHTTPVersionEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["2", "1"]] - """Value of the Origin Max HTTP Version Setting.""" diff --git a/src/cloudflare/types/zones/settings/origin_max_http_version_edit_response.py b/src/cloudflare/types/zones/settings/origin_max_http_version_edit_response.py deleted file mode 100644 index f147194e780..00000000000 --- a/src/cloudflare/types/zones/settings/origin_max_http_version_edit_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# 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 -from .origin_max_http_version import OriginMaxHTTPVersion - -__all__ = ["OriginMaxHTTPVersionEditResponse"] - - -class OriginMaxHTTPVersionEditResponse(BaseModel): - id: OriginMaxHTTPVersion - """Value of the zone setting.""" - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - value: Literal["2", "1"] - """Value of the Origin Max HTTP Version Setting.""" diff --git a/src/cloudflare/types/zones/settings/origin_max_http_version_get_response.py b/src/cloudflare/types/zones/settings/origin_max_http_version_get_response.py deleted file mode 100644 index 035e11644f5..00000000000 --- a/src/cloudflare/types/zones/settings/origin_max_http_version_get_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# 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 -from .origin_max_http_version import OriginMaxHTTPVersion - -__all__ = ["OriginMaxHTTPVersionGetResponse"] - - -class OriginMaxHTTPVersionGetResponse(BaseModel): - id: OriginMaxHTTPVersion - """Value of the zone setting.""" - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - value: Literal["2", "1"] - """Value of the Origin Max HTTP Version Setting.""" diff --git a/src/cloudflare/types/zones/settings/sort_query_string_for_cache.py b/src/cloudflare/types/zones/sort_query_string_for_cache.py similarity index 95% rename from src/cloudflare/types/zones/settings/sort_query_string_for_cache.py rename to src/cloudflare/types/zones/sort_query_string_for_cache.py index a60d4bfb63d..ca2fea8aaac 100644 --- a/src/cloudflare/types/zones/settings/sort_query_string_for_cache.py +++ b/src/cloudflare/types/zones/sort_query_string_for_cache.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["SortQueryStringForCache"] diff --git a/src/cloudflare/types/zones/settings/ssl.py b/src/cloudflare/types/zones/ssl.py similarity index 95% rename from src/cloudflare/types/zones/settings/ssl.py rename to src/cloudflare/types/zones/ssl.py index 43cf8ae0cb7..720c4eaa01b 100644 --- a/src/cloudflare/types/zones/settings/ssl.py +++ b/src/cloudflare/types/zones/ssl.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["SSL"] diff --git a/src/cloudflare/types/zones/settings/ssl_recommender.py b/src/cloudflare/types/zones/ssl_recommender.py similarity index 92% rename from src/cloudflare/types/zones/settings/ssl_recommender.py rename to src/cloudflare/types/zones/ssl_recommender.py index c3a36d8f3c8..3fd86d2b451 100644 --- a/src/cloudflare/types/zones/settings/ssl_recommender.py +++ b/src/cloudflare/types/zones/ssl_recommender.py @@ -3,7 +3,7 @@ from typing import Optional from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["SSLRecommender"] diff --git a/src/cloudflare/types/zones/settings/tls_1_3.py b/src/cloudflare/types/zones/tls_1_3.py similarity index 94% rename from src/cloudflare/types/zones/settings/tls_1_3.py rename to src/cloudflare/types/zones/tls_1_3.py index 6e72f90e7b9..547b489f92a 100644 --- a/src/cloudflare/types/zones/settings/tls_1_3.py +++ b/src/cloudflare/types/zones/tls_1_3.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["TLS1_3"] diff --git a/src/cloudflare/types/zones/settings/tls_client_auth.py b/src/cloudflare/types/zones/tls_client_auth.py similarity index 95% rename from src/cloudflare/types/zones/settings/tls_client_auth.py rename to src/cloudflare/types/zones/tls_client_auth.py index e1ab61fb85b..9d9a33649ad 100644 --- a/src/cloudflare/types/zones/settings/tls_client_auth.py +++ b/src/cloudflare/types/zones/tls_client_auth.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["TLSClientAuth"] diff --git a/src/cloudflare/types/zones/settings/true_client_ip_header.py b/src/cloudflare/types/zones/true_client_ip_header.py similarity index 95% rename from src/cloudflare/types/zones/settings/true_client_ip_header.py rename to src/cloudflare/types/zones/true_client_ip_header.py index 12fd0a2d037..c81c57535bf 100644 --- a/src/cloudflare/types/zones/settings/true_client_ip_header.py +++ b/src/cloudflare/types/zones/true_client_ip_header.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["TrueClientIPHeader"] diff --git a/src/cloudflare/types/zones/settings/waf.py b/src/cloudflare/types/zones/waf.py similarity index 94% rename from src/cloudflare/types/zones/settings/waf.py rename to src/cloudflare/types/zones/waf.py index ec7a5487541..d5f4c0d363d 100644 --- a/src/cloudflare/types/zones/settings/waf.py +++ b/src/cloudflare/types/zones/waf.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["WAF"] diff --git a/src/cloudflare/types/zones/settings/webp.py b/src/cloudflare/types/zones/webp.py similarity index 94% rename from src/cloudflare/types/zones/settings/webp.py rename to src/cloudflare/types/zones/webp.py index 9f4cfaeee3f..87435839431 100644 --- a/src/cloudflare/types/zones/settings/webp.py +++ b/src/cloudflare/types/zones/webp.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["WebP"] diff --git a/src/cloudflare/types/zones/settings/websocket.py b/src/cloudflare/types/zones/websocket.py similarity index 95% rename from src/cloudflare/types/zones/settings/websocket.py rename to src/cloudflare/types/zones/websocket.py index c8471ef28f9..02d38041e08 100644 --- a/src/cloudflare/types/zones/settings/websocket.py +++ b/src/cloudflare/types/zones/websocket.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["Websocket"] diff --git a/src/cloudflare/types/zones/settings/zero_rtt.py b/src/cloudflare/types/zones/zero_rtt.py similarity index 94% rename from src/cloudflare/types/zones/settings/zero_rtt.py rename to src/cloudflare/types/zones/zero_rtt.py index a627cbcc738..f47d0e91f34 100644 --- a/src/cloudflare/types/zones/settings/zero_rtt.py +++ b/src/cloudflare/types/zones/zero_rtt.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel __all__ = ["ZeroRTT"] diff --git a/tests/api_resources/zones/settings/__init__.py b/tests/api_resources/zones/settings/__init__.py deleted file mode 100644 index fd8019a9a1a..00000000000 --- a/tests/api_resources/zones/settings/__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/zones/settings/test_origin_max_http_version.py b/tests/api_resources/zones/settings/test_origin_max_http_version.py deleted file mode 100644 index d8f14784104..00000000000 --- a/tests/api_resources/zones/settings/test_origin_max_http_version.py +++ /dev/null @@ -1,185 +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.zones.settings import ( - OriginMaxHTTPVersionGetResponse, - OriginMaxHTTPVersionEditResponse, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestOriginMaxHTTPVersion: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - origin_max_http_version = client.zones.settings.origin_max_http_version.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="2", - ) - assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.origin_max_http_version.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_max_http_version = response.parse() - assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.origin_max_http_version.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_max_http_version = response.parse() - assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, 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.zones.settings.origin_max_http_version.with_raw_response.edit( - zone_id="", - value="2", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - origin_max_http_version = client.zones.settings.origin_max_http_version.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.origin_max_http_version.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_max_http_version = response.parse() - assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.origin_max_http_version.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_max_http_version = response.parse() - assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, 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 `zone_id` but received ''"): - client.zones.settings.origin_max_http_version.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncOriginMaxHTTPVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - origin_max_http_version = await async_client.zones.settings.origin_max_http_version.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="2", - ) - assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.origin_max_http_version.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_max_http_version = await response.parse() - assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.origin_max_http_version.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_max_http_version = await response.parse() - assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, 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.zones.settings.origin_max_http_version.with_raw_response.edit( - zone_id="", - value="2", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - origin_max_http_version = await async_client.zones.settings.origin_max_http_version.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.origin_max_http_version.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_max_http_version = await response.parse() - assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.origin_max_http_version.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_max_http_version = await response.parse() - assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, 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 `zone_id` but received ''"): - await async_client.zones.settings.origin_max_http_version.with_raw_response.get( - zone_id="", - ) diff --git a/tests/api_resources/zones/settings/test_font_settings.py b/tests/api_resources/zones/test_settings.py similarity index 53% rename from tests/api_resources/zones/settings/test_font_settings.py rename to tests/api_resources/zones/test_settings.py index d80ff7b61db..e3fcc0ac04c 100644 --- a/tests/api_resources/zones/settings/test_font_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -9,174 +9,206 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import FontSettings +from cloudflare.types.zones import SettingGetResponse, SettingEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestFontSettings: +class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_edit(self, client: Cloudflare) -> None: - font_setting = client.zones.settings.font_settings.edit( + setting = client.zones.settings.edit( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", ) - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.font_settings.with_raw_response.edit( + response = client.zones.settings.with_raw_response.edit( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.font_settings.with_streaming_response.edit( + with client.zones.settings.with_streaming_response.edit( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, 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.zones.settings.font_settings.with_raw_response.edit( + client.zones.settings.with_raw_response.edit( + "always_online", zone_id="", - value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: - font_setting = client.zones.settings.font_settings.get( + setting = client.zones.settings.get( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.font_settings.with_raw_response.get( + response = client.zones.settings.with_raw_response.get( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = response.parse() + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.font_settings.with_streaming_response.get( + with client.zones.settings.with_streaming_response.get( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = response.parse() + assert_matches_type(Optional[SettingGetResponse], setting, 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 `zone_id` but received ''"): - client.zones.settings.font_settings.with_raw_response.get( + client.zones.settings.with_raw_response.get( + "always_online", zone_id="", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.get( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + -class TestAsyncFontSettings: +class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - font_setting = await async_client.zones.settings.font_settings.edit( + setting = await async_client.zones.settings.edit( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", ) - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.font_settings.with_raw_response.edit( + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = await response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.font_settings.with_streaming_response.edit( + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="on", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = await response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, 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.zones.settings.font_settings.with_raw_response.edit( + await async_client.zones.settings.with_raw_response.edit( + "always_online", zone_id="", - value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - font_setting = await async_client.zones.settings.font_settings.get( + setting = await async_client.zones.settings.get( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.font_settings.with_raw_response.get( + response = await async_client.zones.settings.with_raw_response.get( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = await response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = await response.parse() + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.font_settings.with_streaming_response.get( + async with async_client.zones.settings.with_streaming_response.get( + "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - font_setting = await response.parse() - assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) + setting = await response.parse() + assert_matches_type(Optional[SettingGetResponse], setting, 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 `zone_id` but received ''"): - await async_client.zones.settings.font_settings.with_raw_response.get( + await async_client.zones.settings.with_raw_response.get( + "always_online", zone_id="", ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.get( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) From de4e3480493c1a6da37373f8cb06df8dacfd0bfa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 03:25:53 +0000 Subject: [PATCH 018/316] feat(api): OpenAPI spec update via Stainless API (#1147) --- .stats.yml | 2 +- api.md | 2 +- src/cloudflare/resources/zones/settings.py | 4558 +++++++++++- src/cloudflare/types/zones/__init__.py | 4 + .../automatic_platform_optimization_param.py | 39 + .../types/zones/setting_edit_params.py | 848 +++ .../types/zones/setting_edit_response.py | 49 +- tests/api_resources/zones/test_settings.py | 6513 ++++++++++++++++- 8 files changed, 11904 insertions(+), 111 deletions(-) create mode 100644 src/cloudflare/types/zones/automatic_platform_optimization_param.py create mode 100644 src/cloudflare/types/zones/setting_edit_params.py diff --git a/.stats.yml b/.stats.yml index c6fd4e3d54d..04aa11159dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4b5d09861a06c00be9bfe41e442a9ed48d4e0dca267ed70d7677ef78159ab997.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml diff --git a/api.md b/api.md index f005ad1776f..b00839577e9 100644 --- a/api.md +++ b/api.md @@ -369,7 +369,7 @@ from cloudflare.types.zones import ( Methods: -- client.zones.settings.edit(setting_id, \*, zone_id) -> Optional +- client.zones.settings.edit(setting_id, \*, zone_id, \*\*params) -> Optional - client.zones.settings.get(setting_id, \*, zone_id) -> Optional ## CustomNameservers diff --git a/src/cloudflare/resources/zones/settings.py b/src/cloudflare/resources/zones/settings.py index 480341ab1ce..1d80cf04b08 100644 --- a/src/cloudflare/resources/zones/settings.py +++ b/src/cloudflare/resources/zones/settings.py @@ -2,11 +2,17 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, List, Optional, cast, overload +from typing_extensions import Literal import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + required_args, + maybe_transform, + async_maybe_transform, +) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -16,11 +22,13 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...types.zones import setting_edit_params from ..._base_client import ( make_request_options, ) from ...types.zones.setting_get_response import SettingGetResponse from ...types.zones.setting_edit_response import SettingEditResponse +from ...types.zones.automatic_platform_optimization_param import AutomaticPlatformOptimizationParam __all__ = ["SettingsResource", "AsyncSettingsResource"] @@ -34,11 +42,14 @@ def with_raw_response(self) -> SettingsResourceWithRawResponse: def with_streaming_response(self) -> SettingsResourceWithStreamingResponse: return SettingsResourceWithStreamingResponse(self) + @overload def edit( self, setting_id: str, *, zone_id: str, + id: Literal["0rtt"], + value: Literal["on", "off"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -54,6 +65,10 @@ def edit( setting_id: Setting name + id: ID of the zone setting. + + value: Current value of the zone setting. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -62,42 +77,35 @@ def edit( 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}") - if not setting_id: - raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") - return self._patch( - f"/zones/{zone_id}/settings/{setting_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SettingEditResponse]]._unwrapper, - ), - cast_to=cast(Type[Optional[SettingEditResponse]], ResultWrapper[SettingEditResponse]), - ) + ... - def get( + @overload + def edit( self, setting_id: str, *, zone_id: str, + id: Literal["advanced_ddos"], + value: Literal["on", "off"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingGetResponse]: + ) -> Optional[SettingEditResponse]: """ - Fetch a single zone setting by name + Updates a single zone setting by the identifier Args: zone_id: Identifier setting_id: Setting name + id: ID of the zone setting. + + value: Current value of the zone setting. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -106,42 +114,53 @@ def get( 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}") - if not setting_id: - raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") - return cast( - Optional[SettingGetResponse], - self._get( - f"/zones/{zone_id}/settings/{setting_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SettingGetResponse]]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[SettingGetResponse] - ), # Union types cannot be passed in as arguments in the type system - ), - ) + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["always_online"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + Args: + zone_id: Identifier -class AsyncSettingsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse: - return AsyncSettingsResourceWithRawResponse(self) + setting_id: Setting name - @cached_property - def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse: - return AsyncSettingsResourceWithStreamingResponse(self) + id: ID of the zone setting. - async def edit( + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( self, setting_id: str, *, zone_id: str, + id: Literal["always_use_https"], + value: Literal["on", "off"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -157,6 +176,10 @@ async def edit( setting_id: Setting name + id: ID of the zone setting. + + value: Current value of the zone setting. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -165,20 +188,4435 @@ async def edit( 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}") - if not setting_id: - raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") - return await self._patch( - f"/zones/{zone_id}/settings/{setting_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[SettingEditResponse]]._unwrapper, + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["automatic_https_rewrites"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["brotli"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["browser_cache_ttl"], + value: Literal[ + 0, + 30, + 60, + 120, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 691200, + 1382400, + 2073600, + 2678400, + 5356800, + 16070400, + 31536000, + ], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["browser_check"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["cache_level"], + value: Literal["aggressive", "basic", "simplified"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["challenge_ttl"], + value: Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ciphers"], + value: List[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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["cname_flattening"], + value: Literal["flatten_at_root", "flatten_all"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: How to flatten the cname destination. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["development_mode"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["early_hints"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["edge_cache_ttl"], + value: Literal[ + 30, + 60, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 518400, + 604800, + ], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["email_obfuscation"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["h2_prioritization"], + value: Literal["on", "off", "custom"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["hotlink_protection"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["http2"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["http3"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["image_resizing"], + value: Literal["on", "off", "open"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ip_geolocation"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ipv6"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["max_upload"], + value: Literal[100, 200, 500], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: identifier of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["min_tls_version"], + value: Literal["1.0", "1.1", "1.2", "1.3"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["minify"], + value: setting_edit_params.MinifyValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["mirage"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["mobile_redirect"], + value: setting_edit_params.MobileRedirectValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Identifier of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["nel"], + value: setting_edit_params.NELValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["opportunistic_encryption"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["opportunistic_onion"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["orange_to_orange"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["origin_error_page_pass_thru"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["polish"], + value: Literal["off", "lossless", "lossy"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["prefetch_preload"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["proxy_read_timeout"], + value: float, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["pseudo_ipv4"], + value: Literal["off", "add_header", "overwrite_header"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Value of the Pseudo IPv4 setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["replace_insecure_js"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["response_buffering"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["rocket_loader"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["automatic_platform_optimization"], + value: AutomaticPlatformOptimizationParam, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["security_header"], + value: setting_edit_params.SecurityHeadersValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone's security header. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["security_level"], + value: Literal["off", "essentially_off", "low", "medium", "high", "under_attack"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["server_side_exclude"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["sha1_support"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["sort_query_string_for_cache"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ssl"], + value: Literal["off", "flexible", "full", "strict"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ssl_recommender"] | NotGiven = NOT_GIVEN, + enabled: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Enrollment value for SSL/TLS Recommender. + + enabled: ssl-recommender enrollment setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["tls_1_2_only"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["tls_1_3"], + value: Literal["on", "off", "zrt"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["tls_client_auth"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["true_client_ip_header"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["waf"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["webp"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["websockets"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + 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 + """ + ... + + @required_args(["zone_id", "id", "value"], ["zone_id"]) + def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["0rtt"] + | Literal["advanced_ddos"] + | Literal["always_online"] + | Literal["always_use_https"] + | Literal["automatic_https_rewrites"] + | Literal["brotli"] + | Literal["browser_cache_ttl"] + | Literal["browser_check"] + | Literal["cache_level"] + | Literal["challenge_ttl"] + | Literal["ciphers"] + | Literal["cname_flattening"] + | Literal["development_mode"] + | Literal["early_hints"] + | Literal["edge_cache_ttl"] + | Literal["email_obfuscation"] + | Literal["h2_prioritization"] + | Literal["hotlink_protection"] + | Literal["http2"] + | Literal["http3"] + | Literal["image_resizing"] + | Literal["ip_geolocation"] + | Literal["ipv6"] + | Literal["max_upload"] + | Literal["min_tls_version"] + | Literal["minify"] + | Literal["mirage"] + | Literal["mobile_redirect"] + | Literal["nel"] + | Literal["opportunistic_encryption"] + | Literal["opportunistic_onion"] + | Literal["orange_to_orange"] + | Literal["origin_error_page_pass_thru"] + | Literal["polish"] + | Literal["prefetch_preload"] + | Literal["proxy_read_timeout"] + | Literal["pseudo_ipv4"] + | Literal["replace_insecure_js"] + | Literal["response_buffering"] + | Literal["rocket_loader"] + | Literal["automatic_platform_optimization"] + | Literal["security_header"] + | Literal["security_level"] + | Literal["server_side_exclude"] + | Literal["sha1_support"] + | Literal["sort_query_string_for_cache"] + | Literal["ssl"] + | Literal["ssl_recommender"] + | Literal["tls_1_2_only"] + | Literal["tls_1_3"] + | Literal["tls_client_auth"] + | Literal["true_client_ip_header"] + | Literal["waf"] + | Literal["webp"] + | Literal["websockets"] + | NotGiven = NOT_GIVEN, + value: Literal["on", "off"] + | Literal[ + 0, + 30, + 60, + 120, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 691200, + 1382400, + 2073600, + 2678400, + 5356800, + 16070400, + 31536000, + ] + | Literal["aggressive", "basic", "simplified"] + | Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] + | List[str] + | Literal["flatten_at_root", "flatten_all"] + | Literal[ + 30, + 60, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 518400, + 604800, + ] + | Literal["on", "off", "custom"] + | Literal["on", "off", "open"] + | Literal[100, 200, 500] + | Literal["1.0", "1.1", "1.2", "1.3"] + | setting_edit_params.MinifyValue + | setting_edit_params.MobileRedirectValue + | setting_edit_params.NELValue + | Literal["off", "lossless", "lossy"] + | float + | Literal["off", "add_header", "overwrite_header"] + | AutomaticPlatformOptimizationParam + | setting_edit_params.SecurityHeadersValue + | Literal["off", "essentially_off", "low", "medium", "high", "under_attack"] + | Literal["off", "flexible", "full", "strict"] + | Literal["on", "off", "zrt"] + | NotGiven = NOT_GIVEN, + enabled: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[SettingEditResponse]: + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not setting_id: + raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") + return cast( + Optional[SettingEditResponse], + self._patch( + f"/zones/{zone_id}/settings/{setting_id}", + body=maybe_transform( + { + "id": id, + "value": value, + "enabled": enabled, + }, + setting_edit_params.SettingEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SettingEditResponse]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[SettingEditResponse] + ), # Union types cannot be passed in as arguments in the type system + ), + ) + + def get( + self, + setting_id: str, + *, + zone_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[SettingGetResponse]: + """ + Fetch a single zone setting by name + + Args: + zone_id: Identifier + + setting_id: Setting name + + 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}") + if not setting_id: + raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") + return cast( + Optional[SettingGetResponse], + self._get( + f"/zones/{zone_id}/settings/{setting_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SettingGetResponse]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[SettingGetResponse] + ), # Union types cannot be passed in as arguments in the type system + ), + ) + + +class AsyncSettingsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse: + return AsyncSettingsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse: + return AsyncSettingsResourceWithStreamingResponse(self) + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["0rtt"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["advanced_ddos"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["always_online"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["always_use_https"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["automatic_https_rewrites"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["brotli"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["browser_cache_ttl"], + value: Literal[ + 0, + 30, + 60, + 120, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 691200, + 1382400, + 2073600, + 2678400, + 5356800, + 16070400, + 31536000, + ], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["browser_check"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["cache_level"], + value: Literal["aggressive", "basic", "simplified"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["challenge_ttl"], + value: Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ciphers"], + value: List[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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["cname_flattening"], + value: Literal["flatten_at_root", "flatten_all"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: How to flatten the cname destination. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["development_mode"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["early_hints"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["edge_cache_ttl"], + value: Literal[ + 30, + 60, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 518400, + 604800, + ], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["email_obfuscation"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["h2_prioritization"], + value: Literal["on", "off", "custom"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["hotlink_protection"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["http2"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["http3"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["image_resizing"], + value: Literal["on", "off", "open"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ip_geolocation"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ipv6"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["max_upload"], + value: Literal[100, 200, 500], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: identifier of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["min_tls_version"], + value: Literal["1.0", "1.1", "1.2", "1.3"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["minify"], + value: setting_edit_params.MinifyValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["mirage"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["mobile_redirect"], + value: setting_edit_params.MobileRedirectValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Identifier of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["nel"], + value: setting_edit_params.NELValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["opportunistic_encryption"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["opportunistic_onion"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["orange_to_orange"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["origin_error_page_pass_thru"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["polish"], + value: Literal["off", "lossless", "lossy"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["prefetch_preload"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["proxy_read_timeout"], + value: float, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["pseudo_ipv4"], + value: Literal["off", "add_header", "overwrite_header"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Value of the Pseudo IPv4 setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["replace_insecure_js"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["response_buffering"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["rocket_loader"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["automatic_platform_optimization"], + value: AutomaticPlatformOptimizationParam, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["security_header"], + value: setting_edit_params.SecurityHeadersValue, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone's security header. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["security_level"], + value: Literal["off", "essentially_off", "low", "medium", "high", "under_attack"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["server_side_exclude"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["sha1_support"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["sort_query_string_for_cache"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ssl"], + value: Literal["off", "flexible", "full", "strict"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["ssl_recommender"] | NotGiven = NOT_GIVEN, + enabled: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Enrollment value for SSL/TLS Recommender. + + enabled: ssl-recommender enrollment setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["tls_1_2_only"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: Zone setting identifier. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["tls_1_3"], + value: Literal["on", "off", "zrt"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["tls_client_auth"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["true_client_ip_header"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["waf"], + value: Literal["on", "off"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["webp"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["websockets"], + value: Literal["off", "on"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[SettingEditResponse]: + """ + Updates a single zone setting by the identifier + + Args: + zone_id: Identifier + + setting_id: Setting name + + id: ID of the zone setting. + + value: Current value of the zone setting. + + 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 + """ + ... + + @required_args(["zone_id", "id", "value"], ["zone_id"]) + async def edit( + self, + setting_id: str, + *, + zone_id: str, + id: Literal["0rtt"] + | Literal["advanced_ddos"] + | Literal["always_online"] + | Literal["always_use_https"] + | Literal["automatic_https_rewrites"] + | Literal["brotli"] + | Literal["browser_cache_ttl"] + | Literal["browser_check"] + | Literal["cache_level"] + | Literal["challenge_ttl"] + | Literal["ciphers"] + | Literal["cname_flattening"] + | Literal["development_mode"] + | Literal["early_hints"] + | Literal["edge_cache_ttl"] + | Literal["email_obfuscation"] + | Literal["h2_prioritization"] + | Literal["hotlink_protection"] + | Literal["http2"] + | Literal["http3"] + | Literal["image_resizing"] + | Literal["ip_geolocation"] + | Literal["ipv6"] + | Literal["max_upload"] + | Literal["min_tls_version"] + | Literal["minify"] + | Literal["mirage"] + | Literal["mobile_redirect"] + | Literal["nel"] + | Literal["opportunistic_encryption"] + | Literal["opportunistic_onion"] + | Literal["orange_to_orange"] + | Literal["origin_error_page_pass_thru"] + | Literal["polish"] + | Literal["prefetch_preload"] + | Literal["proxy_read_timeout"] + | Literal["pseudo_ipv4"] + | Literal["replace_insecure_js"] + | Literal["response_buffering"] + | Literal["rocket_loader"] + | Literal["automatic_platform_optimization"] + | Literal["security_header"] + | Literal["security_level"] + | Literal["server_side_exclude"] + | Literal["sha1_support"] + | Literal["sort_query_string_for_cache"] + | Literal["ssl"] + | Literal["ssl_recommender"] + | Literal["tls_1_2_only"] + | Literal["tls_1_3"] + | Literal["tls_client_auth"] + | Literal["true_client_ip_header"] + | Literal["waf"] + | Literal["webp"] + | Literal["websockets"] + | NotGiven = NOT_GIVEN, + value: Literal["on", "off"] + | Literal[ + 0, + 30, + 60, + 120, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 691200, + 1382400, + 2073600, + 2678400, + 5356800, + 16070400, + 31536000, + ] + | Literal["aggressive", "basic", "simplified"] + | Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] + | List[str] + | Literal["flatten_at_root", "flatten_all"] + | Literal[ + 30, + 60, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 518400, + 604800, + ] + | Literal["on", "off", "custom"] + | Literal["on", "off", "open"] + | Literal[100, 200, 500] + | Literal["1.0", "1.1", "1.2", "1.3"] + | setting_edit_params.MinifyValue + | setting_edit_params.MobileRedirectValue + | setting_edit_params.NELValue + | Literal["off", "lossless", "lossy"] + | float + | Literal["off", "add_header", "overwrite_header"] + | AutomaticPlatformOptimizationParam + | setting_edit_params.SecurityHeadersValue + | Literal["off", "essentially_off", "low", "medium", "high", "under_attack"] + | Literal["off", "flexible", "full", "strict"] + | Literal["on", "off", "zrt"] + | NotGiven = NOT_GIVEN, + enabled: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[SettingEditResponse]: + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not setting_id: + raise ValueError(f"Expected a non-empty value for `setting_id` but received {setting_id!r}") + return cast( + Optional[SettingEditResponse], + await self._patch( + f"/zones/{zone_id}/settings/{setting_id}", + body=await async_maybe_transform( + { + "id": id, + "value": value, + "enabled": enabled, + }, + setting_edit_params.SettingEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SettingEditResponse]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[SettingEditResponse] + ), # Union types cannot be passed in as arguments in the type system ), - cast_to=cast(Type[Optional[SettingEditResponse]], ResultWrapper[SettingEditResponse]), ) async def get( diff --git a/src/cloudflare/types/zones/__init__.py b/src/cloudflare/types/zones/__init__.py index bccc236417f..fa271c04ce3 100644 --- a/src/cloudflare/types/zones/__init__.py +++ b/src/cloudflare/types/zones/__init__.py @@ -52,6 +52,7 @@ from .response_buffering import ResponseBuffering as ResponseBuffering from .zone_create_params import ZoneCreateParams as ZoneCreateParams from .opportunistic_onion import OpportunisticOnion as OpportunisticOnion +from .setting_edit_params import SettingEditParams as SettingEditParams from .server_side_excludes import ServerSideExcludes as ServerSideExcludes from .setting_get_response import SettingGetResponse as SettingGetResponse from .zone_delete_response import ZoneDeleteResponse as ZoneDeleteResponse @@ -70,3 +71,6 @@ from .custom_nameserver_update_params import CustomNameserverUpdateParams as CustomNameserverUpdateParams from .activation_check_trigger_response import ActivationCheckTriggerResponse as ActivationCheckTriggerResponse from .custom_nameserver_update_response import CustomNameserverUpdateResponse as CustomNameserverUpdateResponse +from .automatic_platform_optimization_param import ( + AutomaticPlatformOptimizationParam as AutomaticPlatformOptimizationParam, +) diff --git a/src/cloudflare/types/zones/automatic_platform_optimization_param.py b/src/cloudflare/types/zones/automatic_platform_optimization_param.py new file mode 100644 index 00000000000..b39664ca0e8 --- /dev/null +++ b/src/cloudflare/types/zones/automatic_platform_optimization_param.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 + +__all__ = ["AutomaticPlatformOptimizationParam"] + + +class AutomaticPlatformOptimizationParam(TypedDict, total=False): + cache_by_device_type: Required[bool] + """ + Indicates whether or not + [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) + is enabled. + """ + + cf: Required[bool] + """Indicates whether or not Cloudflare proxy is enabled.""" + + enabled: Required[bool] + """Indicates whether or not Automatic Platform Optimization is enabled.""" + + hostnames: Required[List[str]] + """ + An array of hostnames where Automatic Platform Optimization for WordPress is + activated. + """ + + wordpress: Required[bool] + """Indicates whether or not site is powered by WordPress.""" + + wp_plugin: Required[bool] + """ + Indicates whether or not + [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is + installed. + """ diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py new file mode 100644 index 00000000000..32be3362213 --- /dev/null +++ b/src/cloudflare/types/zones/setting_edit_params.py @@ -0,0 +1,848 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union, Optional +from typing_extensions import Literal, Required, TypedDict + +from .automatic_platform_optimization_param import AutomaticPlatformOptimizationParam + +__all__ = [ + "SettingEditParams", + "ZeroRTT", + "AdvancedDDoS", + "AlwaysOnline", + "AlwaysUseHTTPS", + "AutomaticHTTPSRewrites", + "Brotli", + "BrowserCacheTTL", + "BrowserCheck", + "CacheLevel", + "ChallengeTTL", + "Ciphers", + "ZonesCNAMEFlattening", + "DevelopmentMode", + "EarlyHints", + "ZonesEdgeCacheTTL", + "EmailObfuscation", + "H2Prioritization", + "HotlinkProtection", + "HTTP2", + "HTTP3", + "ImageResizing", + "IPGeolocation", + "IPV6", + "ZonesMaxUpload", + "MinTLSVersion", + "Minify", + "MinifyValue", + "Mirage", + "MobileRedirect", + "MobileRedirectValue", + "NEL", + "NELValue", + "OpportunisticEncryption", + "OpportunisticOnion", + "OrangeToOrange", + "OriginErrorPagePassThru", + "Polish", + "PrefetchPreload", + "ProxyReadTimeout", + "PseudoIPV4", + "ZonesReplaceInsecureJS", + "ResponseBuffering", + "RocketLoader", + "ZonesSchemasAutomaticPlatformOptimization", + "SecurityHeaders", + "SecurityHeadersValue", + "SecurityHeadersValueStrictTransportSecurity", + "SecurityLevel", + "ServerSideExcludes", + "ZonesSha1Support", + "SortQueryStringForCache", + "SSL", + "SSLRecommender", + "ZonesTLS1_2Only", + "TLS1_3", + "TLSClientAuth", + "TrueClientIPHeader", + "WAF", + "WebP", + "Websocket", +] + + +class ZeroRTT(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["0rtt"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class AdvancedDDoS(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["advanced_ddos"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class AlwaysOnline(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["always_online"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class AlwaysUseHTTPS(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["always_use_https"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class AutomaticHTTPSRewrites(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["automatic_https_rewrites"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class Brotli(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["brotli"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" + + +class BrowserCacheTTL(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["browser_cache_ttl"]] + """ID of the zone setting.""" + + value: Required[ + Literal[ + 0, + 30, + 60, + 120, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 691200, + 1382400, + 2073600, + 2678400, + 5356800, + 16070400, + 31536000, + ] + ] + """Current value of the zone setting.""" + + +class BrowserCheck(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["browser_check"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class CacheLevel(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["cache_level"]] + """ID of the zone setting.""" + + value: Required[Literal["aggressive", "basic", "simplified"]] + """Current value of the zone setting.""" + + +class ChallengeTTL(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["challenge_ttl"]] + """ID of the zone setting.""" + + value: Required[ + Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] + ] + """Current value of the zone setting.""" + + +class Ciphers(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["ciphers"]] + """ID of the zone setting.""" + + value: Required[List[str]] + """Current value of the zone setting.""" + + +class ZonesCNAMEFlattening(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["cname_flattening"]] + """How to flatten the cname destination.""" + + value: Required[Literal["flatten_at_root", "flatten_all"]] + """Current value of the zone setting.""" + + +class DevelopmentMode(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["development_mode"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class EarlyHints(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["early_hints"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class ZonesEdgeCacheTTL(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["edge_cache_ttl"]] + """ID of the zone setting.""" + + value: Required[ + Literal[ + 30, + 60, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 518400, + 604800, + ] + ] + """Current value of the zone setting.""" + + +class EmailObfuscation(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["email_obfuscation"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class H2Prioritization(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["h2_prioritization"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off", "custom"]] + """Current value of the zone setting.""" + + +class HotlinkProtection(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["hotlink_protection"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class HTTP2(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["http2"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class HTTP3(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["http3"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class ImageResizing(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["image_resizing"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off", "open"]] + """Current value of the zone setting.""" + + +class IPGeolocation(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["ip_geolocation"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class IPV6(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["ipv6"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" + + +class ZonesMaxUpload(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["max_upload"]] + """identifier of the zone setting.""" + + value: Required[Literal[100, 200, 500]] + """Current value of the zone setting.""" + + +class MinTLSVersion(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["min_tls_version"]] + """ID of the zone setting.""" + + value: Required[Literal["1.0", "1.1", "1.2", "1.3"]] + """Current value of the zone setting.""" + + +class Minify(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["minify"]] + """Zone setting identifier.""" + + value: Required[MinifyValue] + """Current value of the zone setting.""" + + +class MinifyValue(TypedDict, total=False): + css: Literal["on", "off"] + """Automatically minify all CSS files for your website.""" + + html: Literal["on", "off"] + """Automatically minify all HTML files for your website.""" + + js: Literal["on", "off"] + """Automatically minify all JavaScript files for your website.""" + + +class Mirage(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["mirage"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class MobileRedirect(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["mobile_redirect"]] + """Identifier of the zone setting.""" + + value: Required[MobileRedirectValue] + """Current value of the zone setting.""" + + +class MobileRedirectValue(TypedDict, total=False): + mobile_subdomain: Optional[str] + """ + Which subdomain prefix you wish to redirect visitors on mobile devices to + (subdomain must already exist). + """ + + status: Literal["on", "off"] + """ + Deprecated: Use Single Redirects instead + https://developers.cloudflare.com/rules/url-forwarding/single-redirects/examples/#perform-mobile-redirects. + Whether or not mobile redirect is enabled. + """ + + strip_uri: bool + """ + Whether to drop the current page path and redirect to the mobile subdomain URL + root, or keep the path and redirect to the same page on the mobile subdomain. + """ + + +class NEL(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["nel"]] + """Zone setting identifier.""" + + value: Required[NELValue] + """Current value of the zone setting.""" + + +class NELValue(TypedDict, total=False): + enabled: bool + + +class OpportunisticEncryption(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["opportunistic_encryption"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class OpportunisticOnion(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["opportunistic_onion"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class OrangeToOrange(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["orange_to_orange"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class OriginErrorPagePassThru(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["origin_error_page_pass_thru"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class Polish(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["polish"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "lossless", "lossy"]] + """Current value of the zone setting.""" + + +class PrefetchPreload(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["prefetch_preload"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class ProxyReadTimeout(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["proxy_read_timeout"]] + """ID of the zone setting.""" + + value: Required[float] + """Current value of the zone setting.""" + + +class PseudoIPV4(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["pseudo_ipv4"]] + """Value of the Pseudo IPv4 setting.""" + + value: Required[Literal["off", "add_header", "overwrite_header"]] + """Current value of the zone setting.""" + + +class ZonesReplaceInsecureJS(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["replace_insecure_js"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class ResponseBuffering(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["response_buffering"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class RocketLoader(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["rocket_loader"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class ZonesSchemasAutomaticPlatformOptimization(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["automatic_platform_optimization"]] + """ID of the zone setting.""" + + value: Required[AutomaticPlatformOptimizationParam] + """Current value of the zone setting.""" + + +class SecurityHeaders(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["security_header"]] + """ID of the zone's security header.""" + + value: Required[SecurityHeadersValue] + """Current value of the zone setting.""" + + +class SecurityHeadersValueStrictTransportSecurity(TypedDict, total=False): + enabled: bool + """Whether or not strict transport security is enabled.""" + + include_subdomains: bool + """Include all subdomains for strict transport security.""" + + max_age: float + """Max age in seconds of the strict transport security.""" + + nosniff: bool + """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" + + +class SecurityHeadersValue(TypedDict, total=False): + strict_transport_security: SecurityHeadersValueStrictTransportSecurity + """Strict Transport Security.""" + + +class SecurityLevel(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["security_level"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "essentially_off", "low", "medium", "high", "under_attack"]] + """Current value of the zone setting.""" + + +class ServerSideExcludes(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["server_side_exclude"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class ZonesSha1Support(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["sha1_support"]] + """Zone setting identifier.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" + + +class SortQueryStringForCache(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["sort_query_string_for_cache"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class SSL(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["ssl"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "flexible", "full", "strict"]] + """Current value of the zone setting.""" + + +class SSLRecommender(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Literal["ssl_recommender"] + """Enrollment value for SSL/TLS Recommender.""" + + enabled: bool + """ssl-recommender enrollment setting.""" + + +class ZonesTLS1_2Only(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["tls_1_2_only"]] + """Zone setting identifier.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" + + +class TLS1_3(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["tls_1_3"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off", "zrt"]] + """Current value of the zone setting.""" + + +class TLSClientAuth(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["tls_client_auth"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class TrueClientIPHeader(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["true_client_ip_header"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class WAF(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["waf"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" + + +class WebP(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["webp"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" + + +class Websocket(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + id: Required[Literal["websockets"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" + + +SettingEditParams = Union[ + ZeroRTT, + AdvancedDDoS, + AlwaysOnline, + AlwaysUseHTTPS, + AutomaticHTTPSRewrites, + Brotli, + BrowserCacheTTL, + BrowserCheck, + CacheLevel, + ChallengeTTL, + Ciphers, + ZonesCNAMEFlattening, + DevelopmentMode, + EarlyHints, + ZonesEdgeCacheTTL, + EmailObfuscation, + H2Prioritization, + HotlinkProtection, + HTTP2, + HTTP3, + ImageResizing, + IPGeolocation, + IPV6, + ZonesMaxUpload, + MinTLSVersion, + Minify, + Mirage, + MobileRedirect, + NEL, + OpportunisticEncryption, + OpportunisticOnion, + OrangeToOrange, + OriginErrorPagePassThru, + Polish, + PrefetchPreload, + ProxyReadTimeout, + PseudoIPV4, + ZonesReplaceInsecureJS, + ResponseBuffering, + RocketLoader, + ZonesSchemasAutomaticPlatformOptimization, + SecurityHeaders, + SecurityLevel, + ServerSideExcludes, + ZonesSha1Support, + SortQueryStringForCache, + SSL, + SSLRecommender, + ZonesTLS1_2Only, + TLS1_3, + TLSClientAuth, + TrueClientIPHeader, + WAF, + WebP, + Websocket, +] diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py index 6806ed49d02..3c12f6a75d6 100644 --- a/src/cloudflare/types/zones/setting_edit_response.py +++ b/src/cloudflare/types/zones/setting_edit_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -57,18 +57,17 @@ __all__ = [ "SettingEditResponse", - "SettingEditResponseItem", - "SettingEditResponseItemZonesCNAMEFlattening", - "SettingEditResponseItemZonesEdgeCacheTTL", - "SettingEditResponseItemZonesMaxUpload", - "SettingEditResponseItemZonesReplaceInsecureJS", - "SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization", - "SettingEditResponseItemZonesSha1Support", - "SettingEditResponseItemZonesTLS1_2Only", + "ZonesCNAMEFlattening", + "ZonesEdgeCacheTTL", + "ZonesMaxUpload", + "ZonesReplaceInsecureJS", + "ZonesSchemasAutomaticPlatformOptimization", + "ZonesSha1Support", + "ZonesTLS1_2Only", ] -class SettingEditResponseItemZonesCNAMEFlattening(BaseModel): +class ZonesCNAMEFlattening(BaseModel): id: Literal["cname_flattening"] """How to flatten the cname destination.""" @@ -85,7 +84,7 @@ class SettingEditResponseItemZonesCNAMEFlattening(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesEdgeCacheTTL(BaseModel): +class ZonesEdgeCacheTTL(BaseModel): id: Literal["edge_cache_ttl"] """ID of the zone setting.""" @@ -124,7 +123,7 @@ class SettingEditResponseItemZonesEdgeCacheTTL(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesMaxUpload(BaseModel): +class ZonesMaxUpload(BaseModel): id: Literal["max_upload"] """identifier of the zone setting.""" @@ -141,7 +140,7 @@ class SettingEditResponseItemZonesMaxUpload(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesReplaceInsecureJS(BaseModel): +class ZonesReplaceInsecureJS(BaseModel): id: Literal["replace_insecure_js"] """ID of the zone setting.""" @@ -158,7 +157,7 @@ class SettingEditResponseItemZonesReplaceInsecureJS(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel): +class ZonesSchemasAutomaticPlatformOptimization(BaseModel): id: Literal["automatic_platform_optimization"] """ID of the zone setting.""" @@ -175,7 +174,7 @@ class SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel """last time this setting was modified.""" -class SettingEditResponseItemZonesSha1Support(BaseModel): +class ZonesSha1Support(BaseModel): id: Literal["sha1_support"] """Zone setting identifier.""" @@ -192,7 +191,7 @@ class SettingEditResponseItemZonesSha1Support(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesTLS1_2Only(BaseModel): +class ZonesTLS1_2Only(BaseModel): id: Literal["tls_1_2_only"] """Zone setting identifier.""" @@ -209,7 +208,7 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): """last time this setting was modified.""" -SettingEditResponseItem = Union[ +SettingEditResponse = Union[ ZeroRTT, AdvancedDDoS, AlwaysOnline, @@ -221,10 +220,10 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): CacheLevel, ChallengeTTL, Ciphers, - SettingEditResponseItemZonesCNAMEFlattening, + ZonesCNAMEFlattening, DevelopmentMode, EarlyHints, - SettingEditResponseItemZonesEdgeCacheTTL, + ZonesEdgeCacheTTL, EmailObfuscation, H2Prioritization, HotlinkProtection, @@ -233,7 +232,7 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): ImageResizing, IPGeolocation, IPV6, - SettingEditResponseItemZonesMaxUpload, + ZonesMaxUpload, MinTLSVersion, Minify, Mirage, @@ -247,18 +246,18 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): PrefetchPreload, ProxyReadTimeout, PseudoIPV4, - SettingEditResponseItemZonesReplaceInsecureJS, + ZonesReplaceInsecureJS, ResponseBuffering, RocketLoader, - SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization, + ZonesSchemasAutomaticPlatformOptimization, SecurityHeaders, SecurityLevel, ServerSideExcludes, - SettingEditResponseItemZonesSha1Support, + ZonesSha1Support, SortQueryStringForCache, SSL, SSLRecommender, - SettingEditResponseItemZonesTLS1_2Only, + ZonesTLS1_2Only, TLS1_3, TLSClientAuth, TrueClientIPHeader, @@ -266,5 +265,3 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): WebP, Websocket, ] - -SettingEditResponse = List[SettingEditResponseItem] diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py index e3fcc0ac04c..13ce80fe063 100644 --- a/tests/api_resources/zones/test_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -9,7 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones import SettingGetResponse, SettingEditResponse +from cloudflare.types.zones import ( + SettingGetResponse, + SettingEditResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,18 +21,22 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_edit(self, client: Cloudflare) -> None: + def test_method_edit_overload_1(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: + def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", ) assert response.is_closed is True @@ -38,10 +45,12 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: + def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -52,84 +61,6536 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_edit(self, client: Cloudflare) -> None: + 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 ''"): client.zones.settings.with_raw_response.edit( "always_online", zone_id="", + id="0rtt", + value="on", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", ) @parametrize - def test_method_get(self, client: Cloudflare) -> None: - setting = client.zones.settings.get( + def test_method_edit_overload_2(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", ) - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.with_raw_response.get( + def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.with_streaming_response.get( + def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: + 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 ''"): - client.zones.settings.with_raw_response.get( + client.zones.settings.with_raw_response.edit( "always_online", zone_id="", + id="advanced_ddos", + value="on", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): - client.zones.settings.with_raw_response.get( + client.zones.settings.with_raw_response.edit( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", ) + @parametrize + def test_method_edit_overload_3(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) -class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="always_online", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) + + @parametrize + def test_method_edit_overload_4(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="always_use_https", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) + + @parametrize + def test_method_edit_overload_5(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="automatic_https_rewrites", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) + + @parametrize + def test_method_edit_overload_6(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="brotli", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) + + @parametrize + def test_method_edit_overload_7(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="browser_cache_ttl", + value=0, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) + + @parametrize + def test_method_edit_overload_8(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="browser_check", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) + + @parametrize + def test_method_edit_overload_9(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="cache_level", + value="aggressive", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) + + @parametrize + def test_method_edit_overload_10(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="challenge_ttl", + value=300, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) + + @parametrize + def test_method_edit_overload_11(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + + @parametrize + def test_method_edit_overload_12(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="cname_flattening", + value="flatten_at_root", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) + + @parametrize + def test_method_edit_overload_13(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="development_mode", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) + + @parametrize + def test_method_edit_overload_14(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="early_hints", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) + + @parametrize + def test_method_edit_overload_15(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="edge_cache_ttl", + value=30, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) + + @parametrize + def test_method_edit_overload_16(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="email_obfuscation", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) + + @parametrize + def test_method_edit_overload_17(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="h2_prioritization", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) + + @parametrize + def test_method_edit_overload_18(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="hotlink_protection", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) + + @parametrize + def test_method_edit_overload_19(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="http2", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) + + @parametrize + def test_method_edit_overload_20(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="http3", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) + + @parametrize + def test_method_edit_overload_21(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="image_resizing", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) + + @parametrize + def test_method_edit_overload_22(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_22(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_22(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_22(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ip_geolocation", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) + + @parametrize + def test_method_edit_overload_23(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_23(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_23(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_23(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ipv6", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) + + @parametrize + def test_method_edit_overload_24(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_24(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_24(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_24(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="max_upload", + value=100, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) + + @parametrize + def test_method_edit_overload_25(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_25(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_25(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_25(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="min_tls_version", + value="1.0", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) + + @parametrize + def test_method_edit_overload_26(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_method_edit_with_all_params_overload_26(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={ + "css": "on", + "html": "on", + "js": "on", + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_26(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_26(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_26(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="minify", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) + + @parametrize + def test_method_edit_overload_27(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_27(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_27(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_27(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="mirage", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) + + @parametrize + def test_method_edit_overload_28(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_method_edit_with_all_params_overload_28(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={ + "mobile_subdomain": "m", + "status": "on", + "strip_uri": False, + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_28(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_28(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_28(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="mobile_redirect", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) + + @parametrize + def test_method_edit_overload_29(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_method_edit_with_all_params_overload_29(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={"enabled": False}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_29(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_29(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_29(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="nel", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) + + @parametrize + def test_method_edit_overload_30(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_30(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_30(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_30(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="opportunistic_encryption", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) + + @parametrize + def test_method_edit_overload_31(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_31(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_31(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_31(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="opportunistic_onion", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) + + @parametrize + def test_method_edit_overload_32(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_32(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_32(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_32(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="orange_to_orange", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) + + @parametrize + def test_method_edit_overload_33(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_33(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_33(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_33(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="origin_error_page_pass_thru", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) + + @parametrize + def test_method_edit_overload_34(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_34(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_34(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_34(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="polish", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) + + @parametrize + def test_method_edit_overload_35(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_35(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_35(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_35(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="prefetch_preload", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) + + @parametrize + def test_method_edit_overload_36(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_36(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_36(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_36(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="proxy_read_timeout", + value=0, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) + + @parametrize + def test_method_edit_overload_37(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_37(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_37(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_37(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="pseudo_ipv4", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) + + @parametrize + def test_method_edit_overload_38(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_38(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_38(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_38(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="replace_insecure_js", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) + + @parametrize + def test_method_edit_overload_39(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_39(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_39(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_39(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="response_buffering", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) + + @parametrize + def test_method_edit_overload_40(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_40(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_40(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_40(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="rocket_loader", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) + + @parametrize + def test_method_edit_overload_41(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_41(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_41(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_41(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + + @parametrize + def test_method_edit_overload_42(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_method_edit_with_all_params_overload_42(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={ + "strict_transport_security": { + "enabled": True, + "include_subdomains": True, + "max_age": 86400, + "nosniff": True, + } + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_42(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_42(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_42(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="security_header", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) + + @parametrize + def test_method_edit_overload_43(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_43(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_43(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_43(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="security_level", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) + + @parametrize + def test_method_edit_overload_44(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_44(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_44(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_44(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="server_side_exclude", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) + + @parametrize + def test_method_edit_overload_45(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_45(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_45(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_45(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="sha1_support", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) + + @parametrize + def test_method_edit_overload_46(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_46(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_46(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_46(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="sort_query_string_for_cache", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) + + @parametrize + def test_method_edit_overload_47(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_47(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_47(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_47(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ssl", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) + + @parametrize + def test_method_edit_overload_48(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_method_edit_with_all_params_overload_48(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl_recommender", + enabled=True, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_48(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_48(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_48(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_edit_overload_49(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_49(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_49(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_49(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="tls_1_2_only", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) + + @parametrize + def test_method_edit_overload_50(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_50(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_50(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_50(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="tls_1_3", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) + + @parametrize + def test_method_edit_overload_51(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_51(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_51(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_51(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="tls_client_auth", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) + + @parametrize + def test_method_edit_overload_52(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_52(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_52(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_52(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="true_client_ip_header", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) + + @parametrize + def test_method_edit_overload_53(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_53(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_53(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_53(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="waf", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) + + @parametrize + def test_method_edit_overload_54(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_54(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_54(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_54(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="webp", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) + + @parametrize + def test_method_edit_overload_55(self, client: Cloudflare) -> None: + setting = client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_edit_overload_55(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_edit_overload_55(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit_overload_55(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="websockets", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + setting = client.zones.settings.get( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.zones.settings.with_raw_response.get( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = response.parse() + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.zones.settings.with_streaming_response.get( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = response.parse() + assert_matches_type(Optional[SettingGetResponse], setting, 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 `zone_id` but received ''"): + client.zones.settings.with_raw_response.get( + "always_online", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + client.zones.settings.with_raw_response.get( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + +class TestAsyncSettings: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="0rtt", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="0rtt", + value="on", + ) + + @parametrize + async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="advanced_ddos", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="advanced_ddos", + value="on", + ) + + @parametrize + async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="always_online", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_online", + value="on", + ) + + @parametrize + async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="always_use_https", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="always_use_https", + value="on", + ) + + @parametrize + async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="automatic_https_rewrites", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_https_rewrites", + value="on", + ) + + @parametrize + async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="brotli", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="brotli", + value="on", + ) + + @parametrize + async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="browser_cache_ttl", + value=0, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_cache_ttl", + value=0, + ) + + @parametrize + async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="browser_check", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="browser_check", + value="on", + ) + + @parametrize + async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="cache_level", + value="aggressive", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cache_level", + value="aggressive", + ) + + @parametrize + async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="challenge_ttl", + value=300, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="challenge_ttl", + value=300, + ) + + @parametrize + async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ciphers", + value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], + ) + + @parametrize + async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="cname_flattening", + value="flatten_at_root", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="cname_flattening", + value="flatten_at_root", + ) + + @parametrize + async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="development_mode", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="development_mode", + value="on", + ) + + @parametrize + async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="early_hints", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="early_hints", + value="on", + ) + + @parametrize + async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="edge_cache_ttl", + value=30, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="edge_cache_ttl", + value=30, + ) + + @parametrize + async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="email_obfuscation", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="email_obfuscation", + value="on", + ) + + @parametrize + async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="h2_prioritization", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="h2_prioritization", + value="on", + ) + + @parametrize + async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="hotlink_protection", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="hotlink_protection", + value="on", + ) + + @parametrize + async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="http2", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http2", + value="on", + ) + + @parametrize + async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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 ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="http3", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="http3", + value="on", + ) + + @parametrize + async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_21(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="image_resizing", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="image_resizing", + value="on", + ) + + @parametrize + async def test_method_edit_overload_22(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_22(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_22(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_22(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ip_geolocation", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ip_geolocation", + value="on", + ) + + @parametrize + async def test_method_edit_overload_23(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_23(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_23(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_23(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ipv6", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ipv6", + value="on", + ) + + @parametrize + async def test_method_edit_overload_24(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_24(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_24(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_24(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="max_upload", + value=100, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="max_upload", + value=100, + ) + + @parametrize + async def test_method_edit_overload_25(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_25(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_25(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_25(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="min_tls_version", + value="1.0", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="min_tls_version", + value="1.0", + ) + + @parametrize + async def test_method_edit_overload_26(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params_overload_26(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={ + "css": "on", + "html": "on", + "js": "on", + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_26(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_26(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_26(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="minify", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="minify", + value={}, + ) + + @parametrize + async def test_method_edit_overload_27(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_27(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_27(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_27(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="mirage", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mirage", + value="on", + ) + + @parametrize + async def test_method_edit_overload_28(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params_overload_28(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={ + "mobile_subdomain": "m", + "status": "on", + "strip_uri": False, + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_28(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_28(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_28(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="mobile_redirect", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="mobile_redirect", + value={}, + ) + + @parametrize + async def test_method_edit_overload_29(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params_overload_29(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={"enabled": False}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_29(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_29(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_29(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="nel", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="nel", + value={}, + ) + + @parametrize + async def test_method_edit_overload_30(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_30(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_30(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_30(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="opportunistic_encryption", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_encryption", + value="on", + ) + + @parametrize + async def test_method_edit_overload_31(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_31(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_31(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_31(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="opportunistic_onion", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="opportunistic_onion", + value="on", + ) + + @parametrize + async def test_method_edit_overload_32(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_32(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_32(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_32(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="orange_to_orange", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="orange_to_orange", + value="on", + ) + + @parametrize + async def test_method_edit_overload_33(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_33(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_33(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_33(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="origin_error_page_pass_thru", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="origin_error_page_pass_thru", + value="on", + ) + + @parametrize + async def test_method_edit_overload_34(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_34(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_34(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_34(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="polish", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="polish", + value="off", + ) + + @parametrize + async def test_method_edit_overload_35(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_35(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_35(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_35(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="prefetch_preload", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="prefetch_preload", + value="on", + ) + + @parametrize + async def test_method_edit_overload_36(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_36(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_36(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_36(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="proxy_read_timeout", + value=0, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="proxy_read_timeout", + value=0, + ) + + @parametrize + async def test_method_edit_overload_37(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_37(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_37(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_37(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="pseudo_ipv4", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="pseudo_ipv4", + value="off", + ) + + @parametrize + async def test_method_edit_overload_38(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_38(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_38(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_38(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="replace_insecure_js", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="replace_insecure_js", + value="on", + ) + + @parametrize + async def test_method_edit_overload_39(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_39(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_39(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_39(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="response_buffering", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="response_buffering", + value="on", + ) + + @parametrize + async def test_method_edit_overload_40(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_40(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_40(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_40(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="rocket_loader", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="rocket_loader", + value="on", + ) + + @parametrize + async def test_method_edit_overload_41(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_41(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_41(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_41(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="automatic_platform_optimization", + value={ + "cache_by_device_type": False, + "cf": True, + "enabled": True, + "hostnames": ["www.example.com", "example.com", "shop.example.com"], + "wordpress": True, + "wp_plugin": True, + }, + ) + + @parametrize + async def test_method_edit_overload_42(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params_overload_42(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={ + "strict_transport_security": { + "enabled": True, + "include_subdomains": True, + "max_age": 86400, + "nosniff": True, + } + }, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_42(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_42(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_42(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="security_header", + value={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_header", + value={}, + ) + + @parametrize + async def test_method_edit_overload_43(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_43(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_43(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_43(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="security_level", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="security_level", + value="off", + ) + + @parametrize + async def test_method_edit_overload_44(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_44(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_44(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_44(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="server_side_exclude", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="server_side_exclude", + value="on", + ) + + @parametrize + async def test_method_edit_overload_45(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_45(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_45(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_45(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="sha1_support", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sha1_support", + value="on", + ) + + @parametrize + async def test_method_edit_overload_46(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_46(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_46(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_46(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="sort_query_string_for_cache", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="sort_query_string_for_cache", + value="on", + ) + + @parametrize + async def test_method_edit_overload_47(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_47(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_47(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_47(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="ssl", + value="off", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl", + value="off", + ) + + @parametrize + async def test_method_edit_overload_48(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params_overload_48(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="ssl_recommender", + enabled=True, + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_48(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_48(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_48(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_edit_overload_49(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_49(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_49(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_49(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="tls_1_2_only", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_2_only", + value="on", + ) + + @parametrize + async def test_method_edit_overload_50(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_50(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_50(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_50(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="tls_1_3", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_1_3", + value="on", + ) + + @parametrize + async def test_method_edit_overload_51(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_51(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_51(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_51(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="tls_client_auth", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="tls_client_auth", + value="on", + ) + + @parametrize + async def test_method_edit_overload_52(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_52(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_52(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_52(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="true_client_ip_header", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="true_client_ip_header", + value="on", + ) + + @parametrize + async def test_method_edit_overload_53(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_53(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_53(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_53(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="waf", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="waf", + value="on", + ) + + @parametrize + async def test_method_edit_overload_54(self, async_client: AsyncCloudflare) -> None: + setting = await async_client.zones.settings.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_raw_response_edit_overload_54(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + @parametrize + async def test_streaming_response_edit_overload_54(self, async_client: AsyncCloudflare) -> None: + async with async_client.zones.settings.with_streaming_response.edit( + "always_online", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + setting = await response.parse() + assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit_overload_54(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "always_online", + zone_id="", + id="webp", + value="on", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): + await async_client.zones.settings.with_raw_response.edit( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="webp", + value="on", + ) @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: + async def test_method_edit_overload_55(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_edit_overload_55(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", ) assert response.is_closed is True @@ -138,10 +6599,12 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_edit_overload_55(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( "always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -152,17 +6615,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_edit_overload_55(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( "always_online", zone_id="", + id="websockets", + value="on", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + id="websockets", + value="on", ) @parametrize From 17ed0ff86a7946e20422fc4c591ced68543e213d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 06:51:10 +0000 Subject: [PATCH 019/316] 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 04aa11159dd..445d1b220c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43e46563c6f8bd2e5de44d14bc63eb00440213317175f54e03361a275f407bb4.yml From 598261d7acb05e138ea288714f071cfb85aafb21 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 06:53:31 +0000 Subject: [PATCH 020/316] 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 445d1b220c1..04aa11159dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43e46563c6f8bd2e5de44d14bc63eb00440213317175f54e03361a275f407bb4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml From f6f6db3d01e4975c0f04885855689545bcc062e0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 07:57:46 +0000 Subject: [PATCH 021/316] 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 04aa11159dd..27489d131a3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b96b12f3155e2adf72a4253f8b2158e56d3d06a5700ec3ff5c5e0c8231ce0e73.yml From 2547a2e132a6356b92a2699e4730c18130301986 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 09:08:21 +0000 Subject: [PATCH 022/316] 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 27489d131a3..04aa11159dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b96b12f3155e2adf72a4253f8b2158e56d3d06a5700ec3ff5c5e0c8231ce0e73.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml From 8aeb63a65033b430e2f045a404e8b672882e731d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 11:51:20 +0000 Subject: [PATCH 023/316] 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 04aa11159dd..9dc3ab78ef4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ce0679b0d073140306dcb6c3b4f22f68b4fd4a21a0a4e305307bbe26f6740fbf.yml From d265388717ce46986b3f3206e03a429ae1913a55 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 11:59:00 +0000 Subject: [PATCH 024/316] 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 9dc3ab78ef4..445d1b220c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ce0679b0d073140306dcb6c3b4f22f68b4fd4a21a0a4e305307bbe26f6740fbf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43e46563c6f8bd2e5de44d14bc63eb00440213317175f54e03361a275f407bb4.yml From 213c7f0519da8b2f0aa373710644a44850dae529 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 14:22:40 +0000 Subject: [PATCH 025/316] 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 445d1b220c1..9dc3ab78ef4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43e46563c6f8bd2e5de44d14bc63eb00440213317175f54e03361a275f407bb4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ce0679b0d073140306dcb6c3b4f22f68b4fd4a21a0a4e305307bbe26f6740fbf.yml From 1c9534a37a227e6c349246f2b93881c245047282 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 14:24:49 +0000 Subject: [PATCH 026/316] 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 9dc3ab78ef4..445d1b220c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ce0679b0d073140306dcb6c3b4f22f68b4fd4a21a0a4e305307bbe26f6740fbf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43e46563c6f8bd2e5de44d14bc63eb00440213317175f54e03361a275f407bb4.yml From a1b659ca93641feef1b21e5ddc470672d55e7b6a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 14:27:03 +0000 Subject: [PATCH 027/316] 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 445d1b220c1..9dc3ab78ef4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43e46563c6f8bd2e5de44d14bc63eb00440213317175f54e03361a275f407bb4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ce0679b0d073140306dcb6c3b4f22f68b4fd4a21a0a4e305307bbe26f6740fbf.yml From 741afd294103d244e6397c85d55214a957c1b406 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 15:29:09 +0000 Subject: [PATCH 028/316] 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 9dc3ab78ef4..27489d131a3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ce0679b0d073140306dcb6c3b4f22f68b4fd4a21a0a4e305307bbe26f6740fbf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b96b12f3155e2adf72a4253f8b2158e56d3d06a5700ec3ff5c5e0c8231ce0e73.yml From 30e1a06a3dbd613a1ab782e003729b456f630404 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 16:10:17 +0000 Subject: [PATCH 029/316] 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 27489d131a3..04aa11159dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b96b12f3155e2adf72a4253f8b2158e56d3d06a5700ec3ff5c5e0c8231ce0e73.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml From 9026ba1317f96ce83986ee633f4587191f3236cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:05:30 +0000 Subject: [PATCH 030/316] feat(api): OpenAPI spec update via Stainless API (#1148) --- .stats.yml | 2 +- pyproject.toml | 15 +++++++++++++++ src/cloudflare/types/workers/ai_run_params.py | 6 +++--- src/cloudflare/types/workers/ai_run_response.py | 12 ++++++------ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 04aa11159dd..564f66a5780 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml diff --git a/pyproject.toml b/pyproject.toml index deca880317a..4e541ad2769 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,6 +99,21 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["src/cloudflare"] +[tool.hatch.build.targets.sdist] +# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc) +include = [ + "/*.toml", + "/*.json", + "/*.lock", + "/*.md", + "/mypy.ini", + "/noxfile.py", + "bin/*", + "examples/*", + "src/*", + "tests/*", +] + [tool.hatch.metadata.hooks.fancy-pypi-readme] content-type = "text/markdown" diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 8a9b8fd1739..0b6793cfc62 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -11,7 +11,7 @@ "TextClassification", "TextToImage", "TextEmbeddings", - "SpeechRecognition", + "AutomaticSpeechRecognition", "ImageClassification", "ObjectDetection", "TextGeneration", @@ -57,7 +57,7 @@ class TextEmbeddings(TypedDict, total=False): text: Required[Union[str, List[str]]] -class SpeechRecognition(TypedDict, total=False): +class AutomaticSpeechRecognition(TypedDict, total=False): account_id: Required[str] audio: Required[Iterable[float]] @@ -142,7 +142,7 @@ class ImageToTextMessage(TypedDict, total=False): TextClassification, TextToImage, TextEmbeddings, - SpeechRecognition, + AutomaticSpeechRecognition, ImageClassification, ObjectDetection, TextGeneration, diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 183a54eab1c..004acc6feea 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -8,8 +8,8 @@ "AIRunResponse", "TextClassification", "TextEmbeddings", - "SpeechRecognition", - "SpeechRecognitionWord", + "AutomaticSpeechRecognition", + "AutomaticSpeechRecognitionWord", "ImageClassification", "ObjectDetection", "ObjectDetectionBox", @@ -33,7 +33,7 @@ class TextEmbeddings(BaseModel): shape: Optional[List[float]] = None -class SpeechRecognitionWord(BaseModel): +class AutomaticSpeechRecognitionWord(BaseModel): end: Optional[float] = None start: Optional[float] = None @@ -41,14 +41,14 @@ class SpeechRecognitionWord(BaseModel): word: Optional[str] = None -class SpeechRecognition(BaseModel): +class AutomaticSpeechRecognition(BaseModel): text: str vtt: Optional[str] = None word_count: Optional[float] = None - words: Optional[List[SpeechRecognitionWord]] = None + words: Optional[List[AutomaticSpeechRecognitionWord]] = None class ImageClassification(BaseModel): @@ -103,7 +103,7 @@ class ImageToText(BaseModel): List[TextClassification], object, TextEmbeddings, - SpeechRecognition, + AutomaticSpeechRecognition, List[ImageClassification], List[ObjectDetection], UnionMember6, From b017f04e5b811ef32173f45d6b4b3a3f0dd6a81a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:07:56 +0000 Subject: [PATCH 031/316] feat(api): OpenAPI spec update via Stainless API (#1149) --- .stats.yml | 2 +- src/cloudflare/types/workers/ai_run_params.py | 6 +++--- src/cloudflare/types/workers/ai_run_response.py | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 564f66a5780..04aa11159dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 0b6793cfc62..8a9b8fd1739 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -11,7 +11,7 @@ "TextClassification", "TextToImage", "TextEmbeddings", - "AutomaticSpeechRecognition", + "SpeechRecognition", "ImageClassification", "ObjectDetection", "TextGeneration", @@ -57,7 +57,7 @@ class TextEmbeddings(TypedDict, total=False): text: Required[Union[str, List[str]]] -class AutomaticSpeechRecognition(TypedDict, total=False): +class SpeechRecognition(TypedDict, total=False): account_id: Required[str] audio: Required[Iterable[float]] @@ -142,7 +142,7 @@ class ImageToTextMessage(TypedDict, total=False): TextClassification, TextToImage, TextEmbeddings, - AutomaticSpeechRecognition, + SpeechRecognition, ImageClassification, ObjectDetection, TextGeneration, diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 004acc6feea..183a54eab1c 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -8,8 +8,8 @@ "AIRunResponse", "TextClassification", "TextEmbeddings", - "AutomaticSpeechRecognition", - "AutomaticSpeechRecognitionWord", + "SpeechRecognition", + "SpeechRecognitionWord", "ImageClassification", "ObjectDetection", "ObjectDetectionBox", @@ -33,7 +33,7 @@ class TextEmbeddings(BaseModel): shape: Optional[List[float]] = None -class AutomaticSpeechRecognitionWord(BaseModel): +class SpeechRecognitionWord(BaseModel): end: Optional[float] = None start: Optional[float] = None @@ -41,14 +41,14 @@ class AutomaticSpeechRecognitionWord(BaseModel): word: Optional[str] = None -class AutomaticSpeechRecognition(BaseModel): +class SpeechRecognition(BaseModel): text: str vtt: Optional[str] = None word_count: Optional[float] = None - words: Optional[List[AutomaticSpeechRecognitionWord]] = None + words: Optional[List[SpeechRecognitionWord]] = None class ImageClassification(BaseModel): @@ -103,7 +103,7 @@ class ImageToText(BaseModel): List[TextClassification], object, TextEmbeddings, - AutomaticSpeechRecognition, + SpeechRecognition, List[ImageClassification], List[ObjectDetection], UnionMember6, From 11218de0b1ae274ce39d864e785f7ddbdd9499b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 21:14:16 +0000 Subject: [PATCH 032/316] feat(api): OpenAPI spec update via Stainless API (#1150) --- .stats.yml | 2 +- requirements-dev.lock | 3 ++- requirements.lock | 3 ++- src/cloudflare/types/workers/ai_run_params.py | 6 +++--- src/cloudflare/types/workers/ai_run_response.py | 12 ++++++------ 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 04aa11159dd..564f66a5780 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml diff --git a/requirements-dev.lock b/requirements-dev.lock index 3a5469efbd0..e7eb2f7e595 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -10,7 +10,7 @@ -e file:. annotated-types==0.6.0 # via pydantic -anyio==4.1.0 +anyio==4.4.0 # via cloudflare # via httpx argcomplete==3.1.2 @@ -86,6 +86,7 @@ tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 + # via anyio # via cloudflare # via mypy # via pydantic diff --git a/requirements.lock b/requirements.lock index ec0db0c5222..018cc774500 100644 --- a/requirements.lock +++ b/requirements.lock @@ -10,7 +10,7 @@ -e file:. annotated-types==0.6.0 # via pydantic -anyio==4.1.0 +anyio==4.4.0 # via cloudflare # via httpx certifi==2023.7.22 @@ -38,6 +38,7 @@ sniffio==1.3.0 # via cloudflare # via httpx typing-extensions==4.8.0 + # via anyio # via cloudflare # via pydantic # via pydantic-core diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 8a9b8fd1739..0b6793cfc62 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -11,7 +11,7 @@ "TextClassification", "TextToImage", "TextEmbeddings", - "SpeechRecognition", + "AutomaticSpeechRecognition", "ImageClassification", "ObjectDetection", "TextGeneration", @@ -57,7 +57,7 @@ class TextEmbeddings(TypedDict, total=False): text: Required[Union[str, List[str]]] -class SpeechRecognition(TypedDict, total=False): +class AutomaticSpeechRecognition(TypedDict, total=False): account_id: Required[str] audio: Required[Iterable[float]] @@ -142,7 +142,7 @@ class ImageToTextMessage(TypedDict, total=False): TextClassification, TextToImage, TextEmbeddings, - SpeechRecognition, + AutomaticSpeechRecognition, ImageClassification, ObjectDetection, TextGeneration, diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 183a54eab1c..004acc6feea 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -8,8 +8,8 @@ "AIRunResponse", "TextClassification", "TextEmbeddings", - "SpeechRecognition", - "SpeechRecognitionWord", + "AutomaticSpeechRecognition", + "AutomaticSpeechRecognitionWord", "ImageClassification", "ObjectDetection", "ObjectDetectionBox", @@ -33,7 +33,7 @@ class TextEmbeddings(BaseModel): shape: Optional[List[float]] = None -class SpeechRecognitionWord(BaseModel): +class AutomaticSpeechRecognitionWord(BaseModel): end: Optional[float] = None start: Optional[float] = None @@ -41,14 +41,14 @@ class SpeechRecognitionWord(BaseModel): word: Optional[str] = None -class SpeechRecognition(BaseModel): +class AutomaticSpeechRecognition(BaseModel): text: str vtt: Optional[str] = None word_count: Optional[float] = None - words: Optional[List[SpeechRecognitionWord]] = None + words: Optional[List[AutomaticSpeechRecognitionWord]] = None class ImageClassification(BaseModel): @@ -103,7 +103,7 @@ class ImageToText(BaseModel): List[TextClassification], object, TextEmbeddings, - SpeechRecognition, + AutomaticSpeechRecognition, List[ImageClassification], List[ObjectDetection], UnionMember6, From 0559f4076e51d9f25526c0e1d8394c958930b89d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 27 Jun 2024 21:16:20 +0000 Subject: [PATCH 033/316] 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 564f66a5780..1a6225052ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml From aa12f3c9b2b094e7be72997ebc8dfe103117af4d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 28 Jun 2024 09:19:35 +0000 Subject: [PATCH 034/316] 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 1a6225052ce..9a5f48a8a17 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml From c2878bdb2578de9990d0001f139656221c86e9de Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:58:19 +0000 Subject: [PATCH 035/316] feat(api): OpenAPI spec update via Stainless API (#1152) --- .gitignore | 1 + .stats.yml | 2 +- src/cloudflare/_utils/__init__.py | 5 +++- src/cloudflare/_utils/_reflection.py | 34 ++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0f9a66a9764..87797408001 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.prism.log .vscode _dev diff --git a/.stats.yml b/.stats.yml index 9a5f48a8a17..1a6225052ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml diff --git a/src/cloudflare/_utils/__init__.py b/src/cloudflare/_utils/__init__.py index 667e2473f65..3efe66c8e85 100644 --- a/src/cloudflare/_utils/__init__.py +++ b/src/cloudflare/_utils/__init__.py @@ -49,4 +49,7 @@ maybe_transform as maybe_transform, async_maybe_transform as async_maybe_transform, ) -from ._reflection import function_has_argument as function_has_argument +from ._reflection import ( + function_has_argument as function_has_argument, + assert_signatures_in_sync as assert_signatures_in_sync, +) diff --git a/src/cloudflare/_utils/_reflection.py b/src/cloudflare/_utils/_reflection.py index e134f58e086..9a53c7bd21c 100644 --- a/src/cloudflare/_utils/_reflection.py +++ b/src/cloudflare/_utils/_reflection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import inspect from typing import Any, Callable @@ -6,3 +8,35 @@ 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 + + +def assert_signatures_in_sync( + source_func: Callable[..., Any], + check_func: Callable[..., Any], + *, + exclude_params: set[str] = set(), +) -> None: + """Ensure that the signature of the second function matches the first.""" + + check_sig = inspect.signature(check_func) + source_sig = inspect.signature(source_func) + + errors: list[str] = [] + + for name, source_param in source_sig.parameters.items(): + if name in exclude_params: + continue + + custom_param = check_sig.parameters.get(name) + if not custom_param: + errors.append(f"the `{name}` param is missing") + continue + + if custom_param.annotation != source_param.annotation: + errors.append( + f"types for the `{name}` param are do not match; source={repr(source_param.annotation)} checking={repr(source_param.annotation)}" + ) + continue + + if errors: + raise AssertionError(f"{len(errors)} errors encountered when comparing signatures:\n\n" + "\n\n".join(errors)) From 634a302bfc49250984f90381f9e1a4998031cfa4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 28 Jun 2024 16:42:15 +0000 Subject: [PATCH 036/316] 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 1a6225052ce..9a5f48a8a17 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml From d666576e60ec7a24ceb89aa0280b1c91de1aea03 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 28 Jun 2024 17:33:53 +0000 Subject: [PATCH 037/316] 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 9a5f48a8a17..564f66a5780 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml From d064f1a0f41bc13e123b30f96d18450c592cccf5 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 28 Jun 2024 17:52:34 +0000 Subject: [PATCH 038/316] 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 564f66a5780..1a6225052ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml From 21c0d21b766566cdb99a2b260a71f7ee19dd610f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 28 Jun 2024 17:54:42 +0000 Subject: [PATCH 039/316] 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 1a6225052ce..564f66a5780 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml From 6e0e19f4f078d3dd11872cb41177686526f442fb Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 28 Jun 2024 20:28:19 +0000 Subject: [PATCH 040/316] 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 564f66a5780..1a6225052ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml From 9a143298564b586a3655a15249fb6198c72d29ea Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 28 Jun 2024 22:12:57 +0000 Subject: [PATCH 041/316] 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 1a6225052ce..9a5f48a8a17 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml From 129fdd8333e094f979ec6a2f07517fe5aaff4003 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 30 Jun 2024 23:21:08 +0000 Subject: [PATCH 042/316] feat(api): update via SDK Studio (#1154) --- src/cloudflare/_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index cf1a1aadb2b..4aa3abb1416 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -296,7 +296,7 @@ def __init__( @property @override def qs(self) -> Querystring: - return Querystring(array_format="repeat") + return Querystring(nested_format="dots", array_format="repeat") @property @override @@ -717,7 +717,7 @@ def __init__( @property @override def qs(self) -> Querystring: - return Querystring(array_format="repeat") + return Querystring(nested_format="dots", array_format="repeat") @property @override From 8f24c0d53839d2601d4e1bd52d7617f58086926c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 1 Jul 2024 08:35:47 +0000 Subject: [PATCH 043/316] 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 9a5f48a8a17..1a6225052ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml From 9ec6e8880449858c46ffa8b962d33108aa7ac69d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 1 Jul 2024 10:10:05 +0000 Subject: [PATCH 044/316] 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 1a6225052ce..9a5f48a8a17 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8a86f38a55ee41f40c2862f78802f8c5f7eb7182337f3654562bd0154c9320b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml From 7706d48f3f1382e4a23a55a9e8819a8abb5ed075 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:12:24 +0000 Subject: [PATCH 045/316] feat(api): OpenAPI spec update via Stainless API (#1155) --- .stats.yml | 2 +- tests/api_resources/test_ai_gateway.py | 76 +++++++++++++------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a5f48a8a17..42d2b960a42 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-623885448544cf05b4f37663c71fa42a56151359a9b770b24d86195f10da96d8.yml diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py index 836bd4a6bbb..00e3af8c65d 100644 --- a/tests/api_resources/test_ai_gateway.py +++ b/tests/api_resources/test_ai_gateway.py @@ -27,7 +27,7 @@ class TestAIGateway: @parametrize def test_method_create(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -41,7 +41,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -94,7 +94,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -126,7 +126,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -159,7 +159,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.update( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -171,14 +171,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", order_by="string", page=1, @@ -189,7 +189,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -200,7 +200,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,7 +221,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: def test_method_delete(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -229,7 +229,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -262,14 +262,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.delete( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -277,7 +277,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -289,7 +289,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -310,7 +310,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.get( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -320,7 +320,7 @@ class TestAsyncAIGateway: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -334,7 +334,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -352,7 +352,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -387,7 +387,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -401,7 +401,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -419,7 +419,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -452,7 +452,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.update( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -464,14 +464,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", order_by="string", page=1, @@ -482,7 +482,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -493,7 +493,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -514,7 +514,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -522,7 +522,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -534,7 +534,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -555,14 +555,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.delete( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -570,7 +570,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -582,7 +582,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -603,5 +603,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.get( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) From e71be01b47386d43e0555d2d029d03690237eca2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:14:32 +0000 Subject: [PATCH 046/316] feat(api): OpenAPI spec update via Stainless API (#1156) --- .stats.yml | 2 +- tests/api_resources/test_ai_gateway.py | 76 +++++++++++++------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.stats.yml b/.stats.yml index 42d2b960a42..9a5f48a8a17 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-623885448544cf05b4f37663c71fa42a56151359a9b770b24d86195f10da96d8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py index 00e3af8c65d..836bd4a6bbb 100644 --- a/tests/api_resources/test_ai_gateway.py +++ b/tests/api_resources/test_ai_gateway.py @@ -27,7 +27,7 @@ class TestAIGateway: @parametrize def test_method_create(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.create( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -41,7 +41,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.create( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.create( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -94,7 +94,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.update( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.update( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -126,7 +126,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.update( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -159,7 +159,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.update( "", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -171,14 +171,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", order_by="string", page=1, @@ -189,7 +189,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert response.is_closed is True @@ -200,7 +200,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,7 +221,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: def test_method_delete(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.delete( "string", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -229,7 +229,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.delete( "string", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert response.is_closed is True @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.delete( "string", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -262,14 +262,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.delete( "", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.get( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -277,7 +277,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.get( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert response.is_closed is True @@ -289,7 +289,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.get( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -310,7 +310,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.get( "", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @@ -320,7 +320,7 @@ class TestAsyncAIGateway: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.create( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -334,7 +334,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.create( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -352,7 +352,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.create( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -387,7 +387,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.update( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -401,7 +401,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.update( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -419,7 +419,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.update( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -452,7 +452,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.update( "", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -464,14 +464,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", id="my-gateway", order_by="string", page=1, @@ -482,7 +482,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert response.is_closed is True @@ -493,7 +493,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.list( - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -514,7 +514,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.delete( "string", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -522,7 +522,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.delete( "string", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert response.is_closed is True @@ -534,7 +534,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.delete( "string", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -555,14 +555,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.delete( "", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.get( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -570,7 +570,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.get( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert response.is_closed is True @@ -582,7 +582,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.get( "my-gateway", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -603,5 +603,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.get( "", - account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", + account_id="0d37909e38d3e99c29fa2cd343ac421a", ) From d73518c7b75c6624d81971e7d206904d1638f3d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 12:09:08 +0000 Subject: [PATCH 047/316] feat(api): OpenAPI spec update via Stainless API (#1157) --- .stats.yml | 2 +- tests/api_resources/test_ai_gateway.py | 76 +++++++++++++------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a5f48a8a17..61a3a3ae8fe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-005a491f268a48ad59bec643c5484ff419bb09f3360dcab466093e43481b5d63.yml diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py index 836bd4a6bbb..00e3af8c65d 100644 --- a/tests/api_resources/test_ai_gateway.py +++ b/tests/api_resources/test_ai_gateway.py @@ -27,7 +27,7 @@ class TestAIGateway: @parametrize def test_method_create(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -41,7 +41,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -94,7 +94,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -126,7 +126,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -159,7 +159,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.update( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -171,14 +171,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", order_by="string", page=1, @@ -189,7 +189,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -200,7 +200,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,7 +221,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: def test_method_delete(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -229,7 +229,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -262,14 +262,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.delete( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -277,7 +277,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -289,7 +289,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -310,7 +310,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.get( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -320,7 +320,7 @@ class TestAsyncAIGateway: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -334,7 +334,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -352,7 +352,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.create( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", cache_invalidate_on_update=True, cache_ttl=0, @@ -387,7 +387,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -401,7 +401,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -419,7 +419,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.update( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -452,7 +452,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.update( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, collect_logs=True, @@ -464,14 +464,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", order_by="string", page=1, @@ -482,7 +482,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -493,7 +493,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.list( - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -514,7 +514,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -522,7 +522,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -534,7 +534,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.delete( "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -555,14 +555,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.delete( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -570,7 +570,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert response.is_closed is True @@ -582,7 +582,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.get( "my-gateway", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -603,5 +603,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.get( "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", + account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) From 0dff80f61429dec8114d4698c46cc946b366bf8d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:00:24 +0000 Subject: [PATCH 048/316] feat(api): OpenAPI spec update via Stainless API (#1158) --- pyproject.toml | 1 + requirements-dev.lock | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4e541ad2769..6a5b6dbdd32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ dev-dependencies = [ "nox", "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", + "rich>=13.7.1", ] diff --git a/requirements-dev.lock b/requirements-dev.lock index e7eb2f7e595..c046db3be31 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -44,6 +44,10 @@ idna==3.4 importlib-metadata==7.0.0 iniconfig==2.0.0 # via pytest +markdown-it-py==3.0.0 + # via rich +mdurl==0.1.2 + # via markdown-it-py mypy==1.7.1 mypy-extensions==1.0.0 # via mypy @@ -63,6 +67,8 @@ pydantic==2.7.1 # via cloudflare pydantic-core==2.18.2 # via pydantic +pygments==2.18.0 + # via rich pyright==1.1.364 pytest==7.1.1 # via pytest-asyncio @@ -72,6 +78,7 @@ python-dateutil==2.8.2 pytz==2023.3.post1 # via dirty-equals respx==0.20.2 +rich==13.7.1 ruff==0.1.9 setuptools==68.2.2 # via nodeenv From 64819e531dd5134571a0b55ed963dfa3d1a9cc77 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 1 Jul 2024 14:30:29 +0000 Subject: [PATCH 049/316] 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 61a3a3ae8fe..d67b1957fa6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-005a491f268a48ad59bec643c5484ff419bb09f3360dcab466093e43481b5d63.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4150e56a83310816a33ff0adfcdc8efe36229dfd0698c43125833da5fefb2fc0.yml From 32214d9a3c32aa2a5ecad1eb9328dcd8c1343fce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:31:39 +0000 Subject: [PATCH 050/316] feat(api): update via SDK Studio (#1159) --- .stats.yml | 2 +- src/cloudflare/types/queues/queue_created.py | 2 +- src/cloudflare/types/queues/queue_updated.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d67b1957fa6..a0ce7a49b5b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4150e56a83310816a33ff0adfcdc8efe36229dfd0698c43125833da5fefb2fc0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f44d5facd1cae5bf984dbbdaa0674b4ce040f69dc9d877003e7623e22f6e884d.yml diff --git a/src/cloudflare/types/queues/queue_created.py b/src/cloudflare/types/queues/queue_created.py index e2fe296ed31..377e3f5a82d 100644 --- a/src/cloudflare/types/queues/queue_created.py +++ b/src/cloudflare/types/queues/queue_created.py @@ -12,6 +12,6 @@ class QueueCreated(BaseModel): modified_on: Optional[object] = None - queue_id: Optional[object] = None + queue_id: Optional[str] = None queue_name: Optional[str] = None diff --git a/src/cloudflare/types/queues/queue_updated.py b/src/cloudflare/types/queues/queue_updated.py index a6cc5cde5e7..b3512d59720 100644 --- a/src/cloudflare/types/queues/queue_updated.py +++ b/src/cloudflare/types/queues/queue_updated.py @@ -12,6 +12,6 @@ class QueueUpdated(BaseModel): modified_on: Optional[object] = None - queue_id: Optional[object] = None + queue_id: Optional[str] = None queue_name: Optional[str] = None From aeaa56cf6fcba32181047a63b209cfb61b8f5a3b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 1 Jul 2024 23:23:51 +0000 Subject: [PATCH 051/316] 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 a0ce7a49b5b..13ed93fe602 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f44d5facd1cae5bf984dbbdaa0674b4ce040f69dc9d877003e7623e22f6e884d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71069466fdc4dd16c9ef5641559ce335b88b80212c47a9ef9d9b7386614a23be.yml From ffc17e958c1c3601f1c70a18021283bf37225948 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 01:31:33 +0000 Subject: [PATCH 052/316] 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 13ed93fe602..f932c0b77f4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71069466fdc4dd16c9ef5641559ce335b88b80212c47a9ef9d9b7386614a23be.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-524b93cdbb0b571ae50a0b6f404b753dfe08f6240fe88be869e8c72d9182dd87.yml From a897b665cfbbd37d57e62eaa791d2a91e8a45559 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 02:01:05 +0000 Subject: [PATCH 053/316] 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 f932c0b77f4..e3e14c66124 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-524b93cdbb0b571ae50a0b6f404b753dfe08f6240fe88be869e8c72d9182dd87.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b93d06da6e05d93e05cccf20600c3fa27f9b50644c5a10ff0b7c5126c5f765f8.yml From 6f848ba0bea1a6d62115be64580ef67e8bd784b0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 03:25:00 +0000 Subject: [PATCH 054/316] feat(api): update via SDK Studio --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e3e14c66124..c4bb318ada7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b93d06da6e05d93e05cccf20600c3fa27f9b50644c5a10ff0b7c5126c5f765f8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc728f3b3452dfb1261e607f2e2a7052c2b4990bc8602cf01b1d84d887695573.yml From ee81fba8a8ca57e53dda82d3bfdb4492707e4ba6 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 08:44:13 +0000 Subject: [PATCH 055/316] 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 c4bb318ada7..508de1744ad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc728f3b3452dfb1261e607f2e2a7052c2b4990bc8602cf01b1d84d887695573.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bc46ce034ea268e1ff52ab5ccca06401a6c9d758f10229a0f7d90ec0619050e6.yml From f43166b9914feba22ea46f44f9d12900992c4798 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 08:46:19 +0000 Subject: [PATCH 056/316] 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 508de1744ad..4c51e2d954f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bc46ce034ea268e1ff52ab5ccca06401a6c9d758f10229a0f7d90ec0619050e6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b226639530a06cce705491eb93f1721ff0e0244bebb966882fd0652b543d763b.yml From eba86e853d1dae984993f2538d3dac1650390dae Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 09:21:32 +0000 Subject: [PATCH 057/316] 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 4c51e2d954f..8403633201a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b226639530a06cce705491eb93f1721ff0e0244bebb966882fd0652b543d763b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-23739fcf19a78a56ef68373e3bb613cb28b383ba52681e112e079f18e8f5c3cb.yml From 6031ae93d9f3aa5468fa245161eee009d27ffcb5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:23:58 +0000 Subject: [PATCH 058/316] feat(api): OpenAPI spec update via Stainless API (#1160) --- .stats.yml | 2 +- api.md | 8 +-- .../resources/dns/firewall/firewall.py | 56 ++++++++------- .../types/dns/firewall_edit_params.py | 3 + tests/api_resources/dns/test_firewall.py | 70 +++++++++++-------- 5 files changed, 81 insertions(+), 58 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8403633201a..17dbf61025e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-23739fcf19a78a56ef68373e3bb613cb28b383ba52681e112e079f18e8f5c3cb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-21c3f4e3559582f365d9afb16ec8ccfadc79aa7fd5c5d295a3f1bebfa28765ca.yml diff --git a/api.md b/api.md index b00839577e9..a2e72a6a5dd 100644 --- a/api.md +++ b/api.md @@ -1098,11 +1098,11 @@ from cloudflare.types.dns import ( Methods: -- client.dns.firewall.create(\*, account_id, \*\*params) -> Firewall +- client.dns.firewall.create(\*, account_id, \*\*params) -> Optional - client.dns.firewall.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[Firewall] -- client.dns.firewall.delete(dns_firewall_id, \*, account_id) -> FirewallDeleteResponse -- client.dns.firewall.edit(dns_firewall_id, \*, account_id, \*\*params) -> Firewall -- client.dns.firewall.get(dns_firewall_id, \*, account_id) -> Firewall +- client.dns.firewall.delete(dns_firewall_id, \*, account_id) -> Optional +- client.dns.firewall.edit(dns_firewall_id, \*, account_id, \*\*params) -> Optional +- client.dns.firewall.get(dns_firewall_id, \*, account_id) -> Optional ### Analytics diff --git a/src/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py index dd82f5448c3..7bfa583769e 100644 --- a/src/cloudflare/resources/dns/firewall/firewall.py +++ b/src/cloudflare/resources/dns/firewall/firewall.py @@ -77,7 +77,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Firewall: + ) -> Optional[Firewall]: """ Create a configured DNS Firewall Cluster. @@ -136,9 +136,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Firewall]._unwrapper, + post_parser=ResultWrapper[Optional[Firewall]]._unwrapper, ), - cast_to=cast(Type[Firewall], ResultWrapper[Firewall]), + cast_to=cast(Type[Optional[Firewall]], ResultWrapper[Firewall]), ) def list( @@ -204,7 +204,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallDeleteResponse: + ) -> Optional[FirewallDeleteResponse]: """ Delete a configured DNS Firewall Cluster. @@ -232,9 +232,9 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FirewallDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FirewallDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[FirewallDeleteResponse], ResultWrapper[FirewallDeleteResponse]), + cast_to=cast(Type[Optional[FirewallDeleteResponse]], ResultWrapper[FirewallDeleteResponse]), ) def edit( @@ -242,6 +242,7 @@ def edit( dns_firewall_id: str, *, account_id: str, + id: str, deprecate_any_requests: bool, dns_firewall_ips: List[FirewallIPsParam], ecs_fallback: bool, @@ -259,7 +260,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Firewall: + ) -> Optional[Firewall]: """ Modify a DNS Firewall Cluster configuration. @@ -268,6 +269,8 @@ def edit( dns_firewall_id: Identifier + id: Identifier + deprecate_any_requests: Deprecate the response to ANY requests. ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. @@ -304,6 +307,7 @@ def edit( f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}", body=maybe_transform( { + "id": id, "deprecate_any_requests": deprecate_any_requests, "dns_firewall_ips": dns_firewall_ips, "ecs_fallback": ecs_fallback, @@ -323,9 +327,9 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Firewall]._unwrapper, + post_parser=ResultWrapper[Optional[Firewall]]._unwrapper, ), - cast_to=cast(Type[Firewall], ResultWrapper[Firewall]), + cast_to=cast(Type[Optional[Firewall]], ResultWrapper[Firewall]), ) def get( @@ -339,7 +343,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Firewall: + ) -> Optional[Firewall]: """ Show a single configured DNS Firewall cluster for an account. @@ -367,9 +371,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Firewall]._unwrapper, + post_parser=ResultWrapper[Optional[Firewall]]._unwrapper, ), - cast_to=cast(Type[Firewall], ResultWrapper[Firewall]), + cast_to=cast(Type[Optional[Firewall]], ResultWrapper[Firewall]), ) @@ -406,7 +410,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Firewall: + ) -> Optional[Firewall]: """ Create a configured DNS Firewall Cluster. @@ -465,9 +469,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Firewall]._unwrapper, + post_parser=ResultWrapper[Optional[Firewall]]._unwrapper, ), - cast_to=cast(Type[Firewall], ResultWrapper[Firewall]), + cast_to=cast(Type[Optional[Firewall]], ResultWrapper[Firewall]), ) def list( @@ -533,7 +537,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallDeleteResponse: + ) -> Optional[FirewallDeleteResponse]: """ Delete a configured DNS Firewall Cluster. @@ -561,9 +565,9 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FirewallDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FirewallDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[FirewallDeleteResponse], ResultWrapper[FirewallDeleteResponse]), + cast_to=cast(Type[Optional[FirewallDeleteResponse]], ResultWrapper[FirewallDeleteResponse]), ) async def edit( @@ -571,6 +575,7 @@ async def edit( dns_firewall_id: str, *, account_id: str, + id: str, deprecate_any_requests: bool, dns_firewall_ips: List[FirewallIPsParam], ecs_fallback: bool, @@ -588,7 +593,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Firewall: + ) -> Optional[Firewall]: """ Modify a DNS Firewall Cluster configuration. @@ -597,6 +602,8 @@ async def edit( dns_firewall_id: Identifier + id: Identifier + deprecate_any_requests: Deprecate the response to ANY requests. ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. @@ -633,6 +640,7 @@ async def edit( f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}", body=await async_maybe_transform( { + "id": id, "deprecate_any_requests": deprecate_any_requests, "dns_firewall_ips": dns_firewall_ips, "ecs_fallback": ecs_fallback, @@ -652,9 +660,9 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Firewall]._unwrapper, + post_parser=ResultWrapper[Optional[Firewall]]._unwrapper, ), - cast_to=cast(Type[Firewall], ResultWrapper[Firewall]), + cast_to=cast(Type[Optional[Firewall]], ResultWrapper[Firewall]), ) async def get( @@ -668,7 +676,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Firewall: + ) -> Optional[Firewall]: """ Show a single configured DNS Firewall cluster for an account. @@ -696,9 +704,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Firewall]._unwrapper, + post_parser=ResultWrapper[Optional[Firewall]]._unwrapper, ), - cast_to=cast(Type[Firewall], ResultWrapper[Firewall]), + cast_to=cast(Type[Optional[Firewall]], ResultWrapper[Firewall]), ) diff --git a/src/cloudflare/types/dns/firewall_edit_params.py b/src/cloudflare/types/dns/firewall_edit_params.py index 723e2c19cfe..349e2a2b177 100644 --- a/src/cloudflare/types/dns/firewall_edit_params.py +++ b/src/cloudflare/types/dns/firewall_edit_params.py @@ -16,6 +16,9 @@ class FirewallEditParams(TypedDict, total=False): account_id: Required[str] """Identifier""" + id: Required[str] + """Identifier""" + deprecate_any_requests: Required[bool] """Deprecate the response to ANY requests.""" diff --git a/tests/api_resources/dns/test_firewall.py b/tests/api_resources/dns/test_firewall.py index 5d5d6f8646c..b1aa07bd8df 100644 --- a/tests/api_resources/dns/test_firewall.py +++ b/tests/api_resources/dns/test_firewall.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ratelimit=600, retries=2, ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: @@ -61,7 +61,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: @@ -74,7 +74,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -140,7 +140,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) + assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: @@ -152,7 +152,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) + assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: @@ -164,7 +164,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) + assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -187,6 +187,7 @@ def test_method_edit(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -195,13 +196,14 @@ def test_method_edit(self, client: Cloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -217,13 +219,14 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ratelimit=600, retries=2, ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -236,13 +239,14 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -255,7 +259,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -265,6 +269,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: client.dns.firewall.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -278,6 +283,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: client.dns.firewall.with_raw_response.edit( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -293,7 +299,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: @@ -305,7 +311,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: @@ -317,7 +323,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -346,7 +352,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -366,7 +372,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ratelimit=600, retries=2, ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @@ -379,7 +385,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: @@ -392,7 +398,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -458,7 +464,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) + assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @@ -470,7 +476,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) + assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: @@ -482,7 +488,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) + assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -505,6 +511,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -513,13 +520,14 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -535,13 +543,14 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ratelimit=600, retries=2, ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -554,13 +563,14 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -573,7 +583,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -583,6 +593,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: await async_client.dns.firewall.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -596,6 +607,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: await async_client.dns.firewall.with_raw_response.edit( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, dns_firewall_ips=["203.0.113.1", "203.0.113.254", "2001:DB8:AB::CF", "2001:DB8:CD::CF"], ecs_fallback=False, @@ -611,7 +623,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @@ -623,7 +635,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: @@ -635,7 +647,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(Firewall, firewall, path=["response"]) + assert_matches_type(Optional[Firewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True From 079cba58d11fdb9dfb0e3d48eba51ac6f294c1bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:05:18 +0000 Subject: [PATCH 059/316] feat(api): OpenAPI spec update via Stainless API (#1161) --- .stats.yml | 2 +- src/cloudflare/_models.py | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 17dbf61025e..7e16b20d99d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-21c3f4e3559582f365d9afb16ec8ccfadc79aa7fd5c5d295a3f1bebfa28765ca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca12a5056d3bb298068f1638207e72d7ea56d56fa0fbdcbcdfc1c57f6b253f14.yml diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py index 75c68cc7302..5d95bb4b2b2 100644 --- a/src/cloudflare/_models.py +++ b/src/cloudflare/_models.py @@ -10,6 +10,7 @@ ClassVar, Protocol, Required, + ParamSpec, TypedDict, TypeGuard, final, @@ -67,6 +68,9 @@ __all__ = ["BaseModel", "GenericModel"] _T = TypeVar("_T") +_BaseModelT = TypeVar("_BaseModelT", bound="BaseModel") + +P = ParamSpec("P") @runtime_checkable @@ -379,6 +383,29 @@ def is_basemodel_type(type_: type) -> TypeGuard[type[BaseModel] | type[GenericMo return issubclass(origin, BaseModel) or issubclass(origin, GenericModel) +def build( + base_model_cls: Callable[P, _BaseModelT], + *args: P.args, + **kwargs: P.kwargs, +) -> _BaseModelT: + """Construct a BaseModel class without validation. + + This is useful for cases where you need to instantiate a `BaseModel` + from an API response as this provides type-safe params which isn't supported + by helpers like `construct_type()`. + + ```py + build(MyModel, my_field_a="foo", my_field_b=123) + ``` + """ + if args: + raise TypeError( + "Received positional arguments which are not supported; Keyword arguments must be used instead", + ) + + return cast(_BaseModelT, construct_type(type_=base_model_cls, value=kwargs)) + + def construct_type(*, value: object, type_: object) -> object: """Loose coercion to the expected type with construction of nested values. From 6949c20c1eaf29453ffc04182c116f58918ac01d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 13:55:05 +0000 Subject: [PATCH 060/316] 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 7e16b20d99d..60c33911ec6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca12a5056d3bb298068f1638207e72d7ea56d56fa0fbdcbcdfc1c57f6b253f14.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2aa19a9a473089d9de8c95c323270c7b9f88dbf8dc788d9c60b7f5c87629c2a3.yml From 0dbf0f5382d744ac2eff3ca183d31ba1e331cd8f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 15:10:43 +0000 Subject: [PATCH 061/316] 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 60c33911ec6..06d61a57f88 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2aa19a9a473089d9de8c95c323270c7b9f88dbf8dc788d9c60b7f5c87629c2a3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8d652bdc7a06e88e4432adbe4d697dae937fcd7edab5323d37610363be6d481.yml From 6c8b53a499c856886e6eda6db3c1f22e6969e966 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 15:27:45 +0000 Subject: [PATCH 062/316] 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 06d61a57f88..60c33911ec6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8d652bdc7a06e88e4432adbe4d697dae937fcd7edab5323d37610363be6d481.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2aa19a9a473089d9de8c95c323270c7b9f88dbf8dc788d9c60b7f5c87629c2a3.yml From 5584fca47ee8029453960542574421c2bfe1f713 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 15:42:57 +0000 Subject: [PATCH 063/316] 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 60c33911ec6..06d61a57f88 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2aa19a9a473089d9de8c95c323270c7b9f88dbf8dc788d9c60b7f5c87629c2a3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8d652bdc7a06e88e4432adbe4d697dae937fcd7edab5323d37610363be6d481.yml From b25c6fc4490f193f833415491a67967b9617675f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 15:51:16 +0000 Subject: [PATCH 064/316] feat(api): OpenAPI spec update via Stainless API (#1162) --- .stats.yml | 2 +- .../zero_trust/access/custom_pages.py | 35 +++- .../resources/zero_trust/access/tags.py | 47 ++++- .../zero_trust/identity_providers.py | 176 ++++++++++++++++++ .../access/application_create_params.py | 8 +- .../access/application_update_params.py | 8 +- .../access/custom_page_create_params.py | 13 +- .../access/custom_page_update_params.py | 13 +- .../zero_trust/access/saml_saas_app_param.py | 9 +- .../zero_trust/access/tag_create_params.py | 10 +- .../zero_trust/access/tag_update_params.py | 10 +- .../identity_provider_create_params.py | 42 +++++ .../identity_provider_update_params.py | 42 +++++ .../zero_trust/access/test_applications.py | 9 + .../zero_trust/access/test_custom_pages.py | 13 ++ .../zero_trust/access/test_tags.py | 43 +++++ .../zero_trust/test_identity_providers.py | 56 ++++++ 17 files changed, 522 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 06d61a57f88..227f9b449e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8d652bdc7a06e88e4432adbe4d697dae937fcd7edab5323d37610363be6d481.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4312bd23a02e20e5d46c142ec08fbe09bb97ce586a900e10d178982734f44ec.yml diff --git a/src/cloudflare/resources/zero_trust/access/custom_pages.py b/src/cloudflare/resources/zero_trust/access/custom_pages.py index d7eae2f7f7d..0bc9c58dd60 100644 --- a/src/cloudflare/resources/zero_trust/access/custom_pages.py +++ b/src/cloudflare/resources/zero_trust/access/custom_pages.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, Union, Optional, cast +from datetime import datetime from typing_extensions import Literal import httpx @@ -51,6 +52,9 @@ def create( name: str, type: Literal["identity_denied", "forbidden"], app_count: int | NotGiven = NOT_GIVEN, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + uid: str | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -72,6 +76,8 @@ def create( app_count: Number of apps the custom page is assigned to. + uid: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -90,6 +96,9 @@ def create( "name": name, "type": type, "app_count": app_count, + "created_at": created_at, + "uid": uid, + "updated_at": updated_at, }, custom_page_create_params.CustomPageCreateParams, ), @@ -112,6 +121,9 @@ def update( name: str, type: Literal["identity_denied", "forbidden"], app_count: int | NotGiven = NOT_GIVEN, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + uid: str | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -135,6 +147,8 @@ def update( app_count: Number of apps the custom page is assigned to. + uid: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -155,6 +169,9 @@ def update( "name": name, "type": type, "app_count": app_count, + "created_at": created_at, + "uid": uid, + "updated_at": updated_at, }, custom_page_update_params.CustomPageUpdateParams, ), @@ -310,6 +327,9 @@ async def create( name: str, type: Literal["identity_denied", "forbidden"], app_count: int | NotGiven = NOT_GIVEN, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + uid: str | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -331,6 +351,8 @@ async def create( app_count: Number of apps the custom page is assigned to. + uid: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -349,6 +371,9 @@ async def create( "name": name, "type": type, "app_count": app_count, + "created_at": created_at, + "uid": uid, + "updated_at": updated_at, }, custom_page_create_params.CustomPageCreateParams, ), @@ -371,6 +396,9 @@ async def update( name: str, type: Literal["identity_denied", "forbidden"], app_count: int | NotGiven = NOT_GIVEN, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + uid: str | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -394,6 +422,8 @@ async def update( app_count: Number of apps the custom page is assigned to. + uid: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -414,6 +444,9 @@ async def update( "name": name, "type": type, "app_count": app_count, + "created_at": created_at, + "uid": uid, + "updated_at": updated_at, }, custom_page_update_params.CustomPageUpdateParams, ), diff --git a/src/cloudflare/resources/zero_trust/access/tags.py b/src/cloudflare/resources/zero_trust/access/tags.py index 70cc924d5c3..91e0a67fddf 100644 --- a/src/cloudflare/resources/zero_trust/access/tags.py +++ b/src/cloudflare/resources/zero_trust/access/tags.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, Union, Optional, cast +from datetime import datetime import httpx @@ -46,6 +47,8 @@ def create( *, account_id: str, name: str, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -73,7 +76,14 @@ def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._post( f"/accounts/{account_id}/access/tags", - body=maybe_transform({"name": name}, tag_create_params.TagCreateParams), + body=maybe_transform( + { + "name": name, + "created_at": created_at, + "updated_at": updated_at, + }, + tag_create_params.TagCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -90,6 +100,8 @@ def update( *, account_id: str, name: str, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -121,7 +133,14 @@ def update( raise ValueError(f"Expected a non-empty value for `tag_name` but received {tag_name!r}") return self._put( f"/accounts/{account_id}/access/tags/{tag_name}", - body=maybe_transform({"name": name}, tag_update_params.TagUpdateParams), + body=maybe_transform( + { + "name": name, + "created_at": created_at, + "updated_at": updated_at, + }, + tag_update_params.TagUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -271,6 +290,8 @@ async def create( *, account_id: str, name: str, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -298,7 +319,14 @@ async def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._post( f"/accounts/{account_id}/access/tags", - body=await async_maybe_transform({"name": name}, tag_create_params.TagCreateParams), + body=await async_maybe_transform( + { + "name": name, + "created_at": created_at, + "updated_at": updated_at, + }, + tag_create_params.TagCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -315,6 +343,8 @@ async def update( *, account_id: str, name: str, + created_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -346,7 +376,14 @@ async def update( raise ValueError(f"Expected a non-empty value for `tag_name` but received {tag_name!r}") return await self._put( f"/accounts/{account_id}/access/tags/{tag_name}", - body=await async_maybe_transform({"name": name}, tag_update_params.TagUpdateParams), + body=await async_maybe_transform( + { + "name": name, + "created_at": created_at, + "updated_at": updated_at, + }, + tag_update_params.TagUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/identity_providers.py b/src/cloudflare/resources/zero_trust/identity_providers.py index f3d72e3068d..5c6851b1306 100644 --- a/src/cloudflare/resources/zero_trust/identity_providers.py +++ b/src/cloudflare/resources/zero_trust/identity_providers.py @@ -59,6 +59,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -85,6 +86,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -107,6 +110,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -133,6 +137,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -155,6 +161,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -181,6 +188,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -203,6 +212,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -229,6 +239,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -251,6 +263,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -277,6 +290,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -299,6 +314,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -325,6 +341,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -347,6 +365,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -373,6 +392,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -395,6 +416,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -421,6 +443,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -443,6 +467,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -469,6 +494,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -491,6 +518,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -517,6 +545,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -539,6 +569,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -565,6 +596,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -587,6 +620,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -613,6 +647,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -635,6 +671,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -661,6 +698,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -683,6 +722,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -709,6 +749,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -741,6 +783,7 @@ def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -770,6 +813,7 @@ def create( "config": config, "name": name, "type": type, + "id": id, "scim_config": scim_config, }, identity_provider_create_params.IdentityProviderCreateParams, @@ -797,6 +841,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -825,6 +870,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -848,6 +895,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -876,6 +924,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -899,6 +949,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -927,6 +978,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -950,6 +1003,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -978,6 +1032,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1001,6 +1057,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1029,6 +1086,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1052,6 +1111,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1080,6 +1140,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1103,6 +1165,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1131,6 +1194,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1154,6 +1219,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1182,6 +1248,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1205,6 +1273,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1233,6 +1302,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1256,6 +1327,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1284,6 +1356,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1307,6 +1381,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1335,6 +1410,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1358,6 +1435,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1386,6 +1464,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1409,6 +1489,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1437,6 +1518,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1460,6 +1543,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1488,6 +1572,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1521,6 +1607,7 @@ def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1554,6 +1641,7 @@ def update( "config": config, "name": name, "type": type, + "id": id, "scim_config": scim_config, }, identity_provider_update_params.IdentityProviderUpdateParams, @@ -1764,6 +1852,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1790,6 +1879,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1812,6 +1903,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1838,6 +1930,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1860,6 +1954,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1886,6 +1981,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1908,6 +2005,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1934,6 +2032,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -1956,6 +2056,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1982,6 +2083,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2004,6 +2107,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2030,6 +2134,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2052,6 +2158,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2078,6 +2185,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2100,6 +2209,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2126,6 +2236,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2148,6 +2260,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2174,6 +2287,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2196,6 +2311,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2222,6 +2338,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2244,6 +2362,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2270,6 +2389,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2292,6 +2413,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2318,6 +2440,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2340,6 +2464,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2366,6 +2491,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2388,6 +2515,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2414,6 +2542,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2446,6 +2576,7 @@ async def create( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2475,6 +2606,7 @@ async def create( "config": config, "name": name, "type": type, + "id": id, "scim_config": scim_config, }, identity_provider_create_params.IdentityProviderCreateParams, @@ -2502,6 +2634,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2530,6 +2663,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2553,6 +2688,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2581,6 +2717,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2604,6 +2742,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2632,6 +2771,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2655,6 +2796,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2683,6 +2825,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2706,6 +2850,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2734,6 +2879,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2757,6 +2904,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2785,6 +2933,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2808,6 +2958,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2836,6 +2987,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2859,6 +3012,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2887,6 +3041,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2910,6 +3066,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2938,6 +3095,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -2961,6 +3120,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -2989,6 +3149,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -3012,6 +3174,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -3040,6 +3203,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -3063,6 +3228,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -3091,6 +3257,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -3114,6 +3282,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -3142,6 +3311,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -3165,6 +3336,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -3193,6 +3365,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + id: UUID + scim_config: The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. @@ -3226,6 +3400,7 @@ async def update( type: IdentityProviderType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, scim_config: SCIMConfigParam | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -3259,6 +3434,7 @@ async def update( "config": config, "name": name, "type": type, + "id": id, "scim_config": scim_config, }, identity_provider_update_params.IdentityProviderUpdateParams, diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py index f09b5e2993c..c904e9e8f11 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_params.py +++ b/src/cloudflare/types/zero_trust/access/application_create_params.py @@ -3,9 +3,11 @@ from __future__ import annotations from typing import Dict, List, Union, Iterable -from typing_extensions import Literal, Required, TypedDict +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict from .decision import Decision +from ...._utils import PropertyInfo from .allowed_idps import AllowedIdPs from .application_type import ApplicationType from ..access_rule_param import AccessRuleParam @@ -657,6 +659,8 @@ class SaaSApplicationSaaSAppAccessOIDCSaaSApp(TypedDict, total=False): client_secret: str """The application client secret, only returned on POST request.""" + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + custom_claims: SaaSApplicationSaaSAppAccessOIDCSaaSAppCustomClaims grant_types: List[ @@ -686,6 +690,8 @@ class SaaSApplicationSaaSAppAccessOIDCSaaSApp(TypedDict, total=False): automatically enabled if refresh tokens are enabled """ + updated_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + SaaSApplicationSaaSApp = Union[SAMLSaaSAppParam, SaaSApplicationSaaSAppAccessOIDCSaaSApp] diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py index c0da9486d6a..29a947b02b6 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_params.py +++ b/src/cloudflare/types/zero_trust/access/application_update_params.py @@ -3,9 +3,11 @@ from __future__ import annotations from typing import Dict, List, Union, Iterable -from typing_extensions import Literal, Required, TypedDict +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict from .decision import Decision +from ...._utils import PropertyInfo from .allowed_idps import AllowedIdPs from .application_type import ApplicationType from ..access_rule_param import AccessRuleParam @@ -657,6 +659,8 @@ class SaaSApplicationSaaSAppAccessOIDCSaaSApp(TypedDict, total=False): client_secret: str """The application client secret, only returned on POST request.""" + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + custom_claims: SaaSApplicationSaaSAppAccessOIDCSaaSAppCustomClaims grant_types: List[ @@ -686,6 +690,8 @@ class SaaSApplicationSaaSAppAccessOIDCSaaSApp(TypedDict, total=False): automatically enabled if refresh tokens are enabled """ + updated_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + SaaSApplicationSaaSApp = Union[SAMLSaaSAppParam, SaaSApplicationSaaSAppAccessOIDCSaaSApp] diff --git a/src/cloudflare/types/zero_trust/access/custom_page_create_params.py b/src/cloudflare/types/zero_trust/access/custom_page_create_params.py index 585692c65ba..efbeea447fb 100644 --- a/src/cloudflare/types/zero_trust/access/custom_page_create_params.py +++ b/src/cloudflare/types/zero_trust/access/custom_page_create_params.py @@ -2,7 +2,11 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ...._utils import PropertyInfo __all__ = ["CustomPageCreateParams"] @@ -22,3 +26,10 @@ class CustomPageCreateParams(TypedDict, total=False): app_count: int """Number of apps the custom page is assigned to.""" + + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + + uid: str + """UUID""" + + updated_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/cloudflare/types/zero_trust/access/custom_page_update_params.py b/src/cloudflare/types/zero_trust/access/custom_page_update_params.py index 14d5ec2ca9c..05ec96c1ac0 100644 --- a/src/cloudflare/types/zero_trust/access/custom_page_update_params.py +++ b/src/cloudflare/types/zero_trust/access/custom_page_update_params.py @@ -2,7 +2,11 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ...._utils import PropertyInfo __all__ = ["CustomPageUpdateParams"] @@ -22,3 +26,10 @@ class CustomPageUpdateParams(TypedDict, total=False): app_count: int """Number of apps the custom page is assigned to.""" + + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + + uid: str + """UUID""" + + updated_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/cloudflare/types/zero_trust/access/saml_saas_app_param.py b/src/cloudflare/types/zero_trust/access/saml_saas_app_param.py index 8eace9c0634..835baee2235 100644 --- a/src/cloudflare/types/zero_trust/access/saml_saas_app_param.py +++ b/src/cloudflare/types/zero_trust/access/saml_saas_app_param.py @@ -2,8 +2,11 @@ from __future__ import annotations -from typing_extensions import Literal, TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict +from ...._utils import PropertyInfo from .saas_app_name_format import SaaSAppNameFormat from .saas_app_source_param import SaaSAppSourceParam from .saas_app_name_id_format import SaaSAppNameIDFormat @@ -41,6 +44,8 @@ class SAMLSaaSAppParam(TypedDict, total=False): SAML assertion. """ + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + custom_attributes: CustomAttributes default_relay_state: str @@ -80,3 +85,5 @@ class SAMLSaaSAppParam(TypedDict, total=False): sso_endpoint: str """The endpoint where your SaaS application will send login requests.""" + + updated_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/cloudflare/types/zero_trust/access/tag_create_params.py b/src/cloudflare/types/zero_trust/access/tag_create_params.py index b28c8a8cc73..6e4f6cb687a 100644 --- a/src/cloudflare/types/zero_trust/access/tag_create_params.py +++ b/src/cloudflare/types/zero_trust/access/tag_create_params.py @@ -2,7 +2,11 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from ...._utils import PropertyInfo __all__ = ["TagCreateParams"] @@ -13,3 +17,7 @@ class TagCreateParams(TypedDict, total=False): name: Required[str] """The name of the tag""" + + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + + updated_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/cloudflare/types/zero_trust/access/tag_update_params.py b/src/cloudflare/types/zero_trust/access/tag_update_params.py index 594920024fd..2b8ba3b2bee 100644 --- a/src/cloudflare/types/zero_trust/access/tag_update_params.py +++ b/src/cloudflare/types/zero_trust/access/tag_update_params.py @@ -2,7 +2,11 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from ...._utils import PropertyInfo __all__ = ["TagUpdateParams"] @@ -13,3 +17,7 @@ class TagUpdateParams(TypedDict, total=False): name: Required[str] """The name of the tag""" + + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + + updated_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/cloudflare/types/zero_trust/identity_provider_create_params.py b/src/cloudflare/types/zero_trust/identity_provider_create_params.py index 2e8ddbc3ac4..e380a34e05c 100644 --- a/src/cloudflare/types/zero_trust/identity_provider_create_params.py +++ b/src/cloudflare/types/zero_trust/identity_provider_create_params.py @@ -62,6 +62,9 @@ class AzureAD(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -129,6 +132,9 @@ class AccessCentrify(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -180,6 +186,9 @@ class AccessFacebook(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -211,6 +220,9 @@ class AccessGitHub(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -242,6 +254,9 @@ class AccessGoogle(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -287,6 +302,9 @@ class AccessGoogleApps(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -335,6 +353,9 @@ class AccessLinkedin(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -366,6 +387,9 @@ class AccessOIDC(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -423,6 +447,9 @@ class AccessOkta(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -474,6 +501,9 @@ class AccessOnelogin(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -522,6 +552,9 @@ class AccessPingone(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -570,6 +603,9 @@ class AccessSAML(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -641,6 +677,9 @@ class AccessYandex(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -672,6 +711,9 @@ class AccessOnetimepin(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity diff --git a/src/cloudflare/types/zero_trust/identity_provider_update_params.py b/src/cloudflare/types/zero_trust/identity_provider_update_params.py index 5507de7fdbd..cd6dc52cff8 100644 --- a/src/cloudflare/types/zero_trust/identity_provider_update_params.py +++ b/src/cloudflare/types/zero_trust/identity_provider_update_params.py @@ -62,6 +62,9 @@ class AzureAD(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -129,6 +132,9 @@ class AccessCentrify(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -180,6 +186,9 @@ class AccessFacebook(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -211,6 +220,9 @@ class AccessGitHub(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -242,6 +254,9 @@ class AccessGoogle(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -287,6 +302,9 @@ class AccessGoogleApps(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -335,6 +353,9 @@ class AccessLinkedin(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -366,6 +387,9 @@ class AccessOIDC(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -423,6 +447,9 @@ class AccessOkta(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -474,6 +501,9 @@ class AccessOnelogin(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -522,6 +552,9 @@ class AccessPingone(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -570,6 +603,9 @@ class AccessSAML(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -641,6 +677,9 @@ class AccessYandex(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity @@ -672,6 +711,9 @@ class AccessOnetimepin(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" + id: str + """UUID""" + scim_config: SCIMConfigParam """ The configuration settings for enabling a System for Cross-Domain Identity diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 299c51d1ce9..30888509a93 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.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.access import ( ApplicationGetResponse, @@ -233,6 +234,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N saas_app={ "auth_type": "saml", "consumer_service_url": "https://example.com", + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), "custom_attributes": { "friendly_name": "Last Name", "name": "family_name", @@ -254,6 +256,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", + "updated_at": parse_datetime("2014-01-01T05:20:00.12345Z"), }, scim_config={ "authentication": { @@ -1383,6 +1386,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N saas_app={ "auth_type": "saml", "consumer_service_url": "https://example.com", + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), "custom_attributes": { "friendly_name": "Last Name", "name": "family_name", @@ -1404,6 +1408,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", + "updated_at": parse_datetime("2014-01-01T05:20:00.12345Z"), }, scim_config={ "authentication": { @@ -2807,6 +2812,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn saas_app={ "auth_type": "saml", "consumer_service_url": "https://example.com", + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), "custom_attributes": { "friendly_name": "Last Name", "name": "family_name", @@ -2828,6 +2834,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", + "updated_at": parse_datetime("2014-01-01T05:20:00.12345Z"), }, scim_config={ "authentication": { @@ -3957,6 +3964,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn saas_app={ "auth_type": "saml", "consumer_service_url": "https://example.com", + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), "custom_attributes": { "friendly_name": "Last Name", "name": "family_name", @@ -3978,6 +3986,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn "saml_attribute_transform_jsonata": "$ ~>| groups | {'group_name': name} |", "sp_entity_id": "example unique name", "sso_endpoint": "https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd", + "updated_at": parse_datetime("2014-01-01T05:20:00.12345Z"), }, scim_config={ "authentication": { diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index 4677021a7a3..1482ad94f17 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.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.access import ( CustomPage, @@ -40,6 +41,9 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="string", type="identity_denied", app_count=0, + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + uid="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -103,6 +107,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: name="string", type="identity_denied", app_count=0, + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + uid="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -314,6 +321,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="string", type="identity_denied", app_count=0, + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + uid="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -377,6 +387,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare name="string", type="identity_denied", app_count=0, + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + uid="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index 9693f511303..23d8586efca 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.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.access import Tag, TagDeleteResponse @@ -26,6 +27,16 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + tag = client.zero_trust.access.tags.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="engineers", + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + ) + assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.create( @@ -69,6 +80,17 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + tag = client.zero_trust.access.tags.update( + "engineers", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="engineers", + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + ) + assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.update( @@ -259,6 +281,16 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + tag = await async_client.zero_trust.access.tags.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="engineers", + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + ) + assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.create( @@ -302,6 +334,17 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + tag = await async_client.zero_trust.access.tags.update( + "engineers", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="engineers", + created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + updated_at=parse_datetime("2014-01-01T05:20:00.12345Z"), + ) + assert_matches_type(Optional[Tag], tag, path=["response"]) + @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.update( diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index 3977deba608..60410f707a6 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -50,6 +50,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -137,6 +138,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -220,6 +222,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -303,6 +306,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -388,6 +392,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -474,6 +479,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -557,6 +563,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -646,6 +653,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -733,6 +741,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -819,6 +828,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -905,6 +915,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1006,6 +1017,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1089,6 +1101,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1169,6 +1182,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1260,6 +1274,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1362,6 +1377,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1460,6 +1476,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1558,6 +1575,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1658,6 +1676,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1759,6 +1778,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1857,6 +1877,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1961,6 +1982,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2063,6 +2085,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2164,6 +2187,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2265,6 +2289,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2381,6 +2406,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2479,6 +2505,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2574,6 +2601,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2869,6 +2897,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2956,6 +2985,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3039,6 +3069,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3122,6 +3153,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3207,6 +3239,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3293,6 +3326,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3376,6 +3410,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3465,6 +3500,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3552,6 +3588,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3638,6 +3675,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3724,6 +3762,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3825,6 +3864,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3908,6 +3948,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3988,6 +4029,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4079,6 +4121,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4181,6 +4224,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4279,6 +4323,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4377,6 +4422,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4477,6 +4523,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4578,6 +4625,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4676,6 +4724,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4780,6 +4829,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4882,6 +4932,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4983,6 +5034,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5084,6 +5136,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5200,6 +5253,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5298,6 +5352,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5393,6 +5448,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", + id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, From 17c2b78eab91e1e0bb5cefcae5108861dc112cec Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 18:35:39 +0000 Subject: [PATCH 065/316] 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 227f9b449e3..9fbc3445370 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4312bd23a02e20e5d46c142ec08fbe09bb97ce586a900e10d178982734f44ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml From 4a0644f309e82a517c9f28f770b13392736fc4b2 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 18:37:52 +0000 Subject: [PATCH 066/316] 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 9fbc3445370..227f9b449e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4312bd23a02e20e5d46c142ec08fbe09bb97ce586a900e10d178982734f44ec.yml From 94c88793f635b0db08c46a2eedd7952dddd17c92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:05:54 +0000 Subject: [PATCH 067/316] feat(api): OpenAPI spec update via Stainless API (#1163) --- .stats.yml | 2 +- src/cloudflare/_base_client.py | 20 +++++++++++++++++-- .../addressing/loa_documents/loa_documents.py | 8 ++++++++ .../api_gateway/user_schemas/user_schemas.py | 18 ++++++++--------- src/cloudflare/resources/dns/records.py | 8 ++++++++ src/cloudflare/resources/images/v1/v1.py | 8 ++++++++ .../resources/images/v2/direct_uploads.py | 8 ++++++++ .../intel/indicator_feeds/snapshots.py | 8 ++++++++ .../resources/kv/namespaces/values.py | 8 ++++++++ .../pages/projects/deployments/deployments.py | 8 ++++++++ src/cloudflare/resources/snippets/snippets.py | 8 ++++++++ .../stream/captions/language/language.py | 8 ++++++++ src/cloudflare/resources/stream/watermarks.py | 8 ++++++++ .../resources/workers/scripts/content.py | 18 ++++++++--------- .../resources/workers/scripts/versions.py | 18 ++++++++--------- .../dispatch/namespaces/scripts/content.py | 18 ++++++++--------- .../dispatch/namespaces/scripts/settings.py | 8 ++++++++ 17 files changed, 139 insertions(+), 43 deletions(-) diff --git a/.stats.yml b/.stats.yml index 227f9b449e3..9fbc3445370 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4312bd23a02e20e5d46c142ec08fbe09bb97ce586a900e10d178982734f44ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index d6730dbb3e4..01020ef601c 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -58,6 +58,7 @@ HttpxSendArgs, AsyncTransport, RequestOptions, + HttpxRequestFiles, ModelBuilderProtocol, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping @@ -459,6 +460,7 @@ def _build_request( headers = self._build_headers(options) params = _merge_mappings(self.default_query, options.params) content_type = headers.get("Content-Type") + files = options.files # If the given Content-Type header is multipart/form-data then it # has to be removed so that httpx can generate the header with @@ -472,7 +474,7 @@ def _build_request( headers.pop("Content-Type") # As we are now sending multipart/form-data instead of application/json - # we need to tell httpx to use it, https://www.python-httpx.org/advanced/#multipart-file-encoding + # we need to tell httpx to use it, https://www.python-httpx.org/advanced/clients/#multipart-file-encoding if json_data: if not is_dict(json_data): raise TypeError( @@ -480,6 +482,15 @@ def _build_request( ) kwargs["data"] = self._serialize_multipartform(json_data) + # httpx determines whether or not to send a "multipart/form-data" + # request based on the truthiness of the "files" argument. + # This gets around that issue by generating a dict value that + # evaluates to true. + # + # https://github.com/encode/httpx/discussions/2399#discussioncomment-3814186 + if not files: + files = cast(HttpxRequestFiles, ForceMultipartDict()) + # TODO: report this error to httpx return self._client.build_request( # pyright: ignore[reportUnknownMemberType] headers=headers, @@ -492,7 +503,7 @@ def _build_request( # https://github.com/microsoft/pyright/issues/3526#event-6715453066 params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None, json=json_data, - files=options.files, + files=files, **kwargs, ) @@ -1863,6 +1874,11 @@ def make_request_options( return options +class ForceMultipartDict(Dict[str, None]): + def __bool__(self) -> bool: + return True + + class OtherPlatform: def __init__(self, name: str) -> None: self.name = name diff --git a/src/cloudflare/resources/addressing/loa_documents/loa_documents.py b/src/cloudflare/resources/addressing/loa_documents/loa_documents.py index 7080381886a..28c6428ca39 100644 --- a/src/cloudflare/resources/addressing/loa_documents/loa_documents.py +++ b/src/cloudflare/resources/addressing/loa_documents/loa_documents.py @@ -80,6 +80,10 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/addressing/loa_documents", body=maybe_transform({"loa_document": loa_document}, loa_document_create_params.LOADocumentCreateParams), @@ -137,6 +141,10 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/addressing/loa_documents", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py index 25fc670bd03..82510dc75c2 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py @@ -110,11 +110,10 @@ def create( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/zones/{zone_id}/api_gateway/user_schemas", body=maybe_transform(body, user_schema_create_params.UserSchemaCreateParams), @@ -392,11 +391,10 @@ async def create( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/zones/{zone_id}/api_gateway/user_schemas", body=await async_maybe_transform(body, user_schema_create_params.UserSchemaCreateParams), diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index 078bf19d50e..2f1defd119f 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -4326,6 +4326,10 @@ def import_( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/zones/{zone_id}/dns_records/import", body=maybe_transform( @@ -8668,6 +8672,10 @@ async def import_( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/zones/{zone_id}/dns_records/import", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index b3ae56942d4..43cd026fcb5 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -133,6 +133,10 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/images/v1", body=maybe_transform( @@ -434,6 +438,10 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/images/v1", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/images/v2/direct_uploads.py b/src/cloudflare/resources/images/v2/direct_uploads.py index 3c66318e9f2..19b44f66b1e 100644 --- a/src/cloudflare/resources/images/v2/direct_uploads.py +++ b/src/cloudflare/resources/images/v2/direct_uploads.py @@ -89,6 +89,10 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/images/v2/direct_upload", body=maybe_transform( @@ -170,6 +174,10 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/images/v2/direct_upload", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/intel/indicator_feeds/snapshots.py b/src/cloudflare/resources/intel/indicator_feeds/snapshots.py index 3f05ef5b71a..3ee7cf376bc 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/snapshots.py +++ b/src/cloudflare/resources/intel/indicator_feeds/snapshots.py @@ -71,6 +71,10 @@ def update( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot", body=maybe_transform({"source": source}, snapshot_update_params.SnapshotUpdateParams), @@ -127,6 +131,10 @@ async def update( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot", body=await async_maybe_transform({"source": source}, snapshot_update_params.SnapshotUpdateParams), diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py index b80c2b635bb..d8b71b230d3 100644 --- a/src/cloudflare/resources/kv/namespaces/values.py +++ b/src/cloudflare/resources/kv/namespaces/values.py @@ -97,6 +97,10 @@ def update( raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}") if not key_name: raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=maybe_transform( @@ -280,6 +284,10 @@ async def update( raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}") if not key_name: raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/pages/projects/deployments/deployments.py b/src/cloudflare/resources/pages/projects/deployments/deployments.py index 366eb26eacd..73ce05e0bfb 100644 --- a/src/cloudflare/resources/pages/projects/deployments/deployments.py +++ b/src/cloudflare/resources/pages/projects/deployments/deployments.py @@ -97,6 +97,10 @@ def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not project_name: raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/pages/projects/{project_name}/deployments", body=maybe_transform({"branch": branch}, deployment_create_params.DeploymentCreateParams), @@ -408,6 +412,10 @@ async def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not project_name: raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/pages/projects/{project_name}/deployments", body=await async_maybe_transform({"branch": branch}, deployment_create_params.DeploymentCreateParams), diff --git a/src/cloudflare/resources/snippets/snippets.py b/src/cloudflare/resources/snippets/snippets.py index 5c1a0bb75b0..c669513bdf9 100644 --- a/src/cloudflare/resources/snippets/snippets.py +++ b/src/cloudflare/resources/snippets/snippets.py @@ -101,6 +101,10 @@ def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/zones/{zone_id}/snippets/{snippet_name}", body=maybe_transform( @@ -294,6 +298,10 @@ async def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/zones/{zone_id}/snippets/{snippet_name}", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/stream/captions/language/language.py b/src/cloudflare/resources/stream/captions/language/language.py index 3c1bfec470e..84bd7050dee 100644 --- a/src/cloudflare/resources/stream/captions/language/language.py +++ b/src/cloudflare/resources/stream/captions/language/language.py @@ -141,6 +141,10 @@ def update( 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}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/stream/{identifier}/captions/{language}", body=maybe_transform({"file": file}, language_update_params.LanguageUpdateParams), @@ -356,6 +360,10 @@ async def update( 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}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/stream/{identifier}/captions/{language}", body=await async_maybe_transform({"file": file}, language_update_params.LanguageUpdateParams), diff --git a/src/cloudflare/resources/stream/watermarks.py b/src/cloudflare/resources/stream/watermarks.py index bb80780d25d..b071f3a8237 100644 --- a/src/cloudflare/resources/stream/watermarks.py +++ b/src/cloudflare/resources/stream/watermarks.py @@ -96,6 +96,10 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/stream/watermarks", body=maybe_transform( @@ -313,6 +317,10 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/stream/watermarks", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/workers/scripts/content.py b/src/cloudflare/resources/workers/scripts/content.py index 381a25fff2d..7defff75eb2 100644 --- a/src/cloudflare/resources/workers/scripts/content.py +++ b/src/cloudflare/resources/workers/scripts/content.py @@ -111,11 +111,10 @@ def update( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["", ""]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/workers/scripts/{script_name}/content", body=maybe_transform(body, content_update_params.ContentUpdateParams), @@ -242,11 +241,10 @@ async def update( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["", ""]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/workers/scripts/{script_name}/content", body=await async_maybe_transform(body, content_update_params.ContentUpdateParams), diff --git a/src/cloudflare/resources/workers/scripts/versions.py b/src/cloudflare/resources/workers/scripts/versions.py index a13d69c5e8d..baaeb73a4dc 100644 --- a/src/cloudflare/resources/workers/scripts/versions.py +++ b/src/cloudflare/resources/workers/scripts/versions.py @@ -91,11 +91,10 @@ def create( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["", ""]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/workers/scripts/{script_name}/versions", body=maybe_transform(body, version_create_params.VersionCreateParams), @@ -276,11 +275,10 @@ async def create( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["", ""]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/workers/scripts/{script_name}/versions", body=await async_maybe_transform(body, version_create_params.VersionCreateParams), 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 c0e679c40d1..6a75cb6148c 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 @@ -116,11 +116,10 @@ def update( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["", ""]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content", body=maybe_transform(body, content_update_params.ContentUpdateParams), @@ -258,11 +257,10 @@ async def update( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["", ""]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content", body=await async_maybe_transform(body, content_update_params.ContentUpdateParams), diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py index cd5dbad7f9d..c5454697e9e 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py @@ -77,6 +77,10 @@ def edit( 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}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._patch( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings", body=maybe_transform({"settings": settings}, setting_edit_params.SettingEditParams), @@ -187,6 +191,10 @@ async def edit( 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}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._patch( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings", body=await async_maybe_transform({"settings": settings}, setting_edit_params.SettingEditParams), From 9094b4e4b237a6b0576810f33fe0067a9f0945b8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 2 Jul 2024 23:08:01 +0000 Subject: [PATCH 068/316] 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 9fbc3445370..227f9b449e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4312bd23a02e20e5d46c142ec08fbe09bb97ce586a900e10d178982734f44ec.yml From 34706fdbe82f48e7d8465bd7ce0214b87dea5e41 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 08:56:38 +0000 Subject: [PATCH 069/316] 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 227f9b449e3..daa4a0fa29a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4312bd23a02e20e5d46c142ec08fbe09bb97ce586a900e10d178982734f44ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bde142fc13f524152596f3c0cf788bd6474be28718989eb6c205f416df3fc5fc.yml From f7a6ca119d87ca95d169ea216086a162486e2d58 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 10:40:26 +0000 Subject: [PATCH 070/316] 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 daa4a0fa29a..331c7d5530f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bde142fc13f524152596f3c0cf788bd6474be28718989eb6c205f416df3fc5fc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-083ca113d337ffe49bfc03995fdd6be7a8046dee59daf74e91651bed68922019.yml From 17c6455a40f4ca9030d05229b31d3f72ed9b03f7 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 11:19:11 +0000 Subject: [PATCH 071/316] 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 331c7d5530f..9fbc3445370 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-083ca113d337ffe49bfc03995fdd6be7a8046dee59daf74e91651bed68922019.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml From a90da01d76b191ca8db4864f41f1161c6a418ea9 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 11:50:10 +0000 Subject: [PATCH 072/316] 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 9fbc3445370..daa4a0fa29a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bde142fc13f524152596f3c0cf788bd6474be28718989eb6c205f416df3fc5fc.yml From 1551969f22447c6c58eb751601e585361585a393 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 11:52:39 +0000 Subject: [PATCH 073/316] 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 daa4a0fa29a..9fbc3445370 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bde142fc13f524152596f3c0cf788bd6474be28718989eb6c205f416df3fc5fc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml From 1282d2095fc72b2a0d9a89109ad61826229bad92 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 13:23:11 +0000 Subject: [PATCH 074/316] 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 9fbc3445370..daa4a0fa29a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-397336292b6904c10bbe601d75c2153455422a23f3c97a4d6b25087ceab822ad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bde142fc13f524152596f3c0cf788bd6474be28718989eb6c205f416df3fc5fc.yml From 60f53e5336ccba89198c2b82ed0783b658903f78 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 13:25:26 +0000 Subject: [PATCH 075/316] 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 daa4a0fa29a..331c7d5530f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bde142fc13f524152596f3c0cf788bd6474be28718989eb6c205f416df3fc5fc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-083ca113d337ffe49bfc03995fdd6be7a8046dee59daf74e91651bed68922019.yml From 37b2b79102d869092b26403633d00459db7d4fd7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:27:48 +0000 Subject: [PATCH 076/316] feat(api): OpenAPI spec update via Stainless API (#1164) --- .stats.yml | 2 +- .../types/api_gateway/api_shield.py | 130 +++++++++++++++++- 2 files changed, 130 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 331c7d5530f..c09d25c5820 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-083ca113d337ffe49bfc03995fdd6be7a8046dee59daf74e91651bed68922019.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-12ed8fd7f6be01ee3453fc6da43e93e43e769473bd3ea73e2cda7794402b674d.yml diff --git a/src/cloudflare/types/api_gateway/api_shield.py b/src/cloudflare/types/api_gateway/api_shield.py index 5bb350083c2..9f5c25885e8 100644 --- a/src/cloudflare/types/api_gateway/api_shield.py +++ b/src/cloudflare/types/api_gateway/api_shield.py @@ -14,6 +14,18 @@ "FeaturesAPIShieldOperationFeatureParameterSchemas", "FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", "FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", + "FeaturesAPIShieldOperationFeatureAPIRouting", + "FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting", + "FeaturesAPIShieldOperationFeatureConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99", + "FeaturesAPIShieldOperationFeatureSchemaInfo", + "FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", + "FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema", ] @@ -73,7 +85,123 @@ class FeaturesAPIShieldOperationFeatureParameterSchemas(BaseModel): parameter_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas -Features = Union[FeaturesAPIShieldOperationFeatureThresholds, FeaturesAPIShieldOperationFeatureParameterSchemas] +class FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting(BaseModel): + last_updated: Optional[datetime] = None + + route: Optional[str] = None + """Target route.""" + + +class FeaturesAPIShieldOperationFeatureAPIRouting(BaseModel): + api_routing: Optional[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] = None + """API Routing settings on endpoint.""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals( + BaseModel +): + p90: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 + ] = None + """Upper and lower bound for percentile estimate""" + + p95: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 + ] = None + """Upper and lower bound for percentile estimate""" + + p99: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 + ] = None + """Upper and lower bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold(BaseModel): + confidence_intervals: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals + ] = None + + mean: Optional[float] = None + """Suggested threshold.""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals(BaseModel): + last_updated: Optional[datetime] = None + + suggested_threshold: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold + ] = None + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervals(BaseModel): + confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] = None + + +class FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema(BaseModel): + id: Optional[str] = None + """UUID identifier""" + + created_at: Optional[datetime] = None + + is_learned: Optional[bool] = None + """True if schema is Cloudflare-provided.""" + + name: Optional[str] = None + """Schema file name.""" + + +class FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo(BaseModel): + active_schema: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] = None + """Schema active on endpoint.""" + + learned_available: Optional[bool] = None + """True if a Cloudflare-provided learned schema is available for this endpoint.""" + + mitigation_action: Optional[Literal["none", "log", "block"]] = None + """Action taken on requests failing validation.""" + + +class FeaturesAPIShieldOperationFeatureSchemaInfo(BaseModel): + schema_info: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] = None + + +Features = Union[ + FeaturesAPIShieldOperationFeatureThresholds, + FeaturesAPIShieldOperationFeatureParameterSchemas, + FeaturesAPIShieldOperationFeatureAPIRouting, + FeaturesAPIShieldOperationFeatureConfidenceIntervals, + FeaturesAPIShieldOperationFeatureSchemaInfo, +] class APIShield(BaseModel): From 3c4078f9df62341cb4eb203db869e7e14a15a43f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 13:54:12 +0000 Subject: [PATCH 077/316] 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 c09d25c5820..13fa4017b46 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-12ed8fd7f6be01ee3453fc6da43e93e43e769473bd3ea73e2cda7794402b674d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d47bb546f6a50ba72d0520459be7bddb3bd0902737e4035f4cd4b7a63f447d1.yml From 38feb387f4ae465c94934daf211a0f4ea365653e Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 13:56:32 +0000 Subject: [PATCH 078/316] 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 13fa4017b46..c09d25c5820 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d47bb546f6a50ba72d0520459be7bddb3bd0902737e4035f4cd4b7a63f447d1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-12ed8fd7f6be01ee3453fc6da43e93e43e769473bd3ea73e2cda7794402b674d.yml From 8a429e35b8473e54ea071bd28394d946069451fc Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 13:58:51 +0000 Subject: [PATCH 079/316] 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 c09d25c5820..13fa4017b46 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-12ed8fd7f6be01ee3453fc6da43e93e43e769473bd3ea73e2cda7794402b674d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d47bb546f6a50ba72d0520459be7bddb3bd0902737e4035f4cd4b7a63f447d1.yml From 522bc467ebdd2dbcacb8bfce715df6395c9cd8e8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 15:13:26 +0000 Subject: [PATCH 080/316] 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 13fa4017b46..7ceb1033bff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d47bb546f6a50ba72d0520459be7bddb3bd0902737e4035f4cd4b7a63f447d1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6479aeb5bec3a92a5e31e7129065d636310157577470eda192516abad197e96c.yml From 6503a1689e3d9e2c47fd375320a7028972ece709 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:01:13 +0000 Subject: [PATCH 081/316] feat(api): OpenAPI spec update via Stainless API (#1165) --- .stats.yml | 2 +- src/cloudflare/resources/r2/temporary_credentials.py | 4 ++-- src/cloudflare/types/r2/temporary_credential_create_params.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7ceb1033bff..edc2c51eae3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6479aeb5bec3a92a5e31e7129065d636310157577470eda192516abad197e96c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9ec83085fa15e1f1cc613401a707a27556909eab3b6b756359938f8fd4a1aef4.yml diff --git a/src/cloudflare/resources/r2/temporary_credentials.py b/src/cloudflare/resources/r2/temporary_credentials.py index f621ecdab1a..48de6924ad5 100644 --- a/src/cloudflare/resources/r2/temporary_credentials.py +++ b/src/cloudflare/resources/r2/temporary_credentials.py @@ -63,7 +63,7 @@ def create( Args: account_id: Account ID - bucket: Name of the GCS bucket + bucket: Name of the R2 bucket parent_access_key_id: The parent access key id to use for signing @@ -142,7 +142,7 @@ async def create( Args: account_id: Account ID - bucket: Name of the GCS bucket + bucket: Name of the R2 bucket parent_access_key_id: The parent access key id to use for signing diff --git a/src/cloudflare/types/r2/temporary_credential_create_params.py b/src/cloudflare/types/r2/temporary_credential_create_params.py index c79dcc8e5f6..861a6a184fe 100644 --- a/src/cloudflare/types/r2/temporary_credential_create_params.py +++ b/src/cloudflare/types/r2/temporary_credential_create_params.py @@ -15,7 +15,7 @@ class TemporaryCredentialCreateParams(TypedDict, total=False): """Account ID""" bucket: Required[str] - """Name of the GCS bucket""" + """Name of the R2 bucket""" parent_access_key_id: Required[Annotated[str, PropertyInfo(alias="parentAccessKeyId")]] """The parent access key id to use for signing""" From 3dcb89f67e0b9bbc8e58445fb4964f16761a6655 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:55:56 +0000 Subject: [PATCH 082/316] feat(api): OpenAPI spec update via Stainless API (#1166) --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 8 ++++---- .github/workflows/publish-pypi.yml | 4 ++-- .stats.yml | 2 +- requirements-dev.lock | 1 + requirements.lock | 1 + src/cloudflare/resources/workers/ai/ai.py | 8 ++++++++ src/cloudflare/types/workers/ai_run_params.py | 4 ++++ tests/api_resources/workers/test_ai.py | 4 ++++ 9 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 83bca8f716a..ac9a2e75218 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} USER vscode -RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash +RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash ENV PATH=/home/vscode/.rye/shims:$PATH RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e853349a718..021ad706126 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.24.0 + RYE_VERSION: '0.35.0' RYE_INSTALL_OPTION: '--yes' - name: Install dependencies @@ -41,7 +41,7 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.24.0 + RYE_VERSION: '0.35.0' RYE_INSTALL_OPTION: '--yes' - name: Bootstrap @@ -61,8 +61,8 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.24.0 - RYE_INSTALL_OPTION: "--yes" + RYE_VERSION: '0.35.0' + RYE_INSTALL_OPTION: '--yes' - name: Install dependencies run: | rye sync --all-features diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 6528ad30f81..60c0cde4031 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -21,8 +21,8 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.24.0 - RYE_INSTALL_OPTION: "--yes" + RYE_VERSION: '0.35.0' + RYE_INSTALL_OPTION: '--yes' - name: Publish to PyPI run: | diff --git a/.stats.yml b/.stats.yml index edc2c51eae3..4d35e2d2ce3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9ec83085fa15e1f1cc613401a707a27556909eab3b6b756359938f8fd4a1aef4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml diff --git a/requirements-dev.lock b/requirements-dev.lock index c046db3be31..12d3582d538 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -6,6 +6,7 @@ # features: [] # all-features: true # with-sources: false +# generate-hashes: false -e file:. annotated-types==0.6.0 diff --git a/requirements.lock b/requirements.lock index 018cc774500..a0d34229e70 100644 --- a/requirements.lock +++ b/requirements.lock @@ -6,6 +6,7 @@ # features: [] # all-features: true # with-sources: false +# generate-hashes: false -e file:. annotated-types==0.6.0 diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index c92feba6e64..d2ee0cb1b99 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -133,6 +133,8 @@ def run( prompt: str, guidance: float | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, + loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, @@ -486,6 +488,8 @@ def run( prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, + loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, @@ -624,6 +628,8 @@ async def run( prompt: str, guidance: float | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, + loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, @@ -977,6 +983,8 @@ async def run( prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, + loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 0b6793cfc62..12cd367dc01 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -44,6 +44,10 @@ class TextToImage(TypedDict, total=False): image: Iterable[float] + lora_weights: Iterable[float] + + loras: List[str] + mask: Iterable[float] num_steps: int diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index 14ba8b90bbe..af717a3e838 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -140,6 +140,8 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None prompt="x", guidance=0, image=[0, 0, 0], + lora_weights=[0, 0, 0], + loras=["string", "string", "string"], mask=[0, 0, 0], num_steps=0, strength=0, @@ -820,6 +822,8 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl prompt="x", guidance=0, image=[0, 0, 0], + lora_weights=[0, 0, 0], + loras=["string", "string", "string"], mask=[0, 0, 0], num_steps=0, strength=0, From 8fb0b193fc2229cedddaa58788bc99266e08b2bf Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 18:15:04 +0000 Subject: [PATCH 083/316] 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 4d35e2d2ce3..3465caeb83f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b510411fe55f5a01fa872b1d0cba1ac33fd931d61c5d69a18ccf7427d4f9a06d.yml From 75500a82528ea4719f465ea829d5859bd6cd7753 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 21:23:39 +0000 Subject: [PATCH 084/316] 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 3465caeb83f..4d35e2d2ce3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b510411fe55f5a01fa872b1d0cba1ac33fd931d61c5d69a18ccf7427d4f9a06d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml From 2f1d0e0668fbb75bf7bc2f8b0b9352a344282a52 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 21:26:05 +0000 Subject: [PATCH 085/316] 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 4d35e2d2ce3..fe878255423 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c0f8a4cbfa4e11587cac3d57e9bcbd4084b1b5e3634f05d418aa996c3a37ccb2.yml From 3995ced50250d1c2064d211d417646b96412dfd0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 21:28:27 +0000 Subject: [PATCH 086/316] 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 fe878255423..4d35e2d2ce3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c0f8a4cbfa4e11587cac3d57e9bcbd4084b1b5e3634f05d418aa996c3a37ccb2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml From 316f72ed25fb5ac235d10528bed1b3cea884c6c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 23:22:39 +0000 Subject: [PATCH 087/316] feat(api): OpenAPI spec update via Stainless API (#1167) --- .stats.yml | 2 +- src/cloudflare/types/zones/security_headers.py | 3 +++ src/cloudflare/types/zones/setting_edit_params.py | 3 +++ tests/api_resources/zones/test_settings.py | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d35e2d2ce3..38bc69cb988 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e82b646fc856d1a049c805050d47c145293003664daee4f933cc9e66dc95264b.yml diff --git a/src/cloudflare/types/zones/security_headers.py b/src/cloudflare/types/zones/security_headers.py index c2ad2888bbb..0054c519547 100644 --- a/src/cloudflare/types/zones/security_headers.py +++ b/src/cloudflare/types/zones/security_headers.py @@ -22,6 +22,9 @@ class ValueStrictTransportSecurity(BaseModel): nosniff: Optional[bool] = None """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" + preload: Optional[bool] = None + """Enable automatic preload of the HSTS configuration.""" + class Value(BaseModel): strict_transport_security: Optional[ValueStrictTransportSecurity] = None diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py index 32be3362213..3bc53b6eba5 100644 --- a/src/cloudflare/types/zones/setting_edit_params.py +++ b/src/cloudflare/types/zones/setting_edit_params.py @@ -640,6 +640,9 @@ class SecurityHeadersValueStrictTransportSecurity(TypedDict, total=False): nosniff: bool """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" + preload: bool + """Enable automatic preload of the HSTS configuration.""" + class SecurityHeadersValue(TypedDict, total=False): strict_transport_security: SecurityHeadersValueStrictTransportSecurity diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py index 13ce80fe063..f8af72165ec 100644 --- a/tests/api_resources/zones/test_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -2493,6 +2493,7 @@ def test_method_edit_with_all_params_overload_42(self, client: Cloudflare) -> No "include_subdomains": True, "max_age": 86400, "nosniff": True, + "preload": True, } }, ) @@ -5825,6 +5826,7 @@ async def test_method_edit_with_all_params_overload_42(self, async_client: Async "include_subdomains": True, "max_age": 86400, "nosniff": True, + "preload": True, } }, ) From b6be1224977894d2e22f15a2351d32ab762c92a8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 23:24:49 +0000 Subject: [PATCH 088/316] 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 38bc69cb988..f9772bd6d1d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e82b646fc856d1a049c805050d47c145293003664daee4f933cc9e66dc95264b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4797385eb0ae37cd907cd63f03b5dde58588871fd8c44b0ccdfc62c9f37dbbc5.yml From e78475a10ec7076dc4f2aa17ee022474ae2adf23 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 3 Jul 2024 23:27:03 +0000 Subject: [PATCH 089/316] 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 f9772bd6d1d..3ce2c63b630 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4797385eb0ae37cd907cd63f03b5dde58588871fd8c44b0ccdfc62c9f37dbbc5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c4b189384dd6c53416271abb9b2fe109b44c1ddbb06d3d892e56457bbe0af70.yml From bce89ebcd94cf8f27f1df383bb26fab80ece51df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:54:15 +0000 Subject: [PATCH 090/316] feat(api): OpenAPI spec update via Stainless API (#1168) --- .stats.yml | 2 +- .../resources/radar/annotations/outages.py | 76 +-- src/cloudflare/resources/radar/as112/as112.py | 42 +- .../resources/radar/as112/summary.py | 252 +-------- .../radar/as112/timeseries_groups.py | 252 +-------- src/cloudflare/resources/radar/as112/top.py | 168 +----- .../resources/radar/attacks/layer3/layer3.py | 42 +- .../resources/radar/attacks/layer3/summary.py | 252 +-------- .../radar/attacks/layer3/timeseries_groups.py | 352 ++---------- .../radar/attacks/layer3/top/locations.py | 84 +-- .../resources/radar/attacks/layer3/top/top.py | 126 +---- .../resources/radar/attacks/layer7/layer7.py | 180 ++++-- .../resources/radar/attacks/layer7/summary.py | 252 +-------- .../radar/attacks/layer7/timeseries_groups.py | 336 +---------- .../radar/attacks/layer7/top/ases.py | 176 ++++-- .../radar/attacks/layer7/top/locations.py | 352 +++++++++--- .../resources/radar/attacks/layer7/top/top.py | 528 ++++++++++++++---- src/cloudflare/resources/radar/bgp/bgp.py | 42 +- .../resources/radar/bgp/hijacks/events.py | 38 +- src/cloudflare/resources/radar/bgp/ips.py | 38 +- .../resources/radar/bgp/leaks/events.py | 38 +- .../resources/radar/bgp/top/ases.py | 42 +- src/cloudflare/resources/radar/bgp/top/top.py | 42 +- .../resources/radar/connection_tampering.py | 84 +-- src/cloudflare/resources/radar/dns/top.py | 84 +-- .../resources/radar/email/routing/summary.py | 252 +-------- .../radar/email/routing/timeseries_groups.py | 252 +-------- .../resources/radar/email/security/summary.py | 378 +------------ .../radar/email/security/timeseries_groups.py | 378 +------------ .../email/security/top/tlds/malicious.py | 42 +- .../radar/email/security/top/tlds/spam.py | 42 +- .../radar/email/security/top/tlds/spoof.py | 42 +- .../radar/email/security/top/tlds/tlds.py | 42 +- .../resources/radar/http/ases/ases.py | 42 +- .../resources/radar/http/ases/bot_class.py | 42 +- .../radar/http/ases/browser_family.py | 42 +- .../resources/radar/http/ases/device_type.py | 42 +- .../resources/radar/http/ases/http_method.py | 42 +- .../radar/http/ases/http_protocol.py | 42 +- .../resources/radar/http/ases/ip_version.py | 42 +- .../resources/radar/http/ases/os.py | 42 +- .../resources/radar/http/ases/tls_version.py | 42 +- src/cloudflare/resources/radar/http/http.py | 42 +- .../radar/http/locations/bot_class.py | 42 +- .../radar/http/locations/browser_family.py | 42 +- .../radar/http/locations/device_type.py | 42 +- .../radar/http/locations/http_method.py | 42 +- .../radar/http/locations/http_protocol.py | 42 +- .../radar/http/locations/ip_version.py | 42 +- .../radar/http/locations/locations.py | 42 +- .../resources/radar/http/locations/os.py | 42 +- .../radar/http/locations/tls_version.py | 42 +- .../resources/radar/http/summary.py | 336 +---------- .../resources/radar/http/timeseries_groups.py | 420 +------------- src/cloudflare/resources/radar/http/top.py | 84 +-- .../resources/radar/netflows/netflows.py | 42 +- .../resources/radar/netflows/top.py | 84 +-- src/cloudflare/resources/radar/quality/iqi.py | 84 +-- .../resources/radar/ranking/ranking.py | 42 +- .../radar/traffic_anomalies/locations.py | 38 +- .../traffic_anomalies/traffic_anomalies.py | 38 +- .../resources/radar/verified_bots/top.py | 84 +-- .../radar/annotations/outage_get_params.py | 21 +- .../annotations/outage_locations_params.py | 21 +- .../radar/as112/summary_dnssec_params.py | 23 +- .../types/radar/as112/summary_edns_params.py | 23 +- .../radar/as112/summary_ip_version_params.py | 23 +- .../radar/as112/summary_protocol_params.py | 23 +- .../radar/as112/summary_query_type_params.py | 23 +- .../as112/summary_response_codes_params.py | 23 +- .../as112/timeseries_group_dnssec_params.py | 23 +- .../as112/timeseries_group_edns_params.py | 23 +- .../timeseries_group_ip_version_params.py | 23 +- .../as112/timeseries_group_protocol_params.py | 23 +- .../timeseries_group_query_type_params.py | 23 +- .../timeseries_group_response_codes_params.py | 23 +- .../types/radar/as112/top_dnssec_params.py | 23 +- .../types/radar/as112/top_edns_params.py | 23 +- .../radar/as112/top_ip_version_params.py | 23 +- .../types/radar/as112/top_locations_params.py | 23 +- .../types/radar/as112_timeseries_params.py | 23 +- .../attacks/layer3/summary_bitrate_params.py | 23 +- .../attacks/layer3/summary_duration_params.py | 23 +- .../attacks/layer3/summary_get_params.py | 23 +- .../layer3/summary_ip_version_params.py | 23 +- .../attacks/layer3/summary_protocol_params.py | 23 +- .../attacks/layer3/summary_vector_params.py | 23 +- .../layer3/timeseries_group_bitrate_params.py | 23 +- .../timeseries_group_duration_params.py | 23 +- .../layer3/timeseries_group_get_params.py | 23 +- .../timeseries_group_industry_params.py | 26 +- .../timeseries_group_ip_version_params.py | 23 +- .../timeseries_group_protocol_params.py | 23 +- .../layer3/timeseries_group_vector_params.py | 23 +- .../timeseries_group_vertical_params.py | 26 +- .../layer3/top/location_origin_params.py | 23 +- .../layer3/top/location_target_params.py | 23 +- .../attacks/layer3/top_attacks_params.py | 23 +- .../attacks/layer3/top_industry_params.py | 23 +- .../attacks/layer3/top_vertical_params.py | 23 +- .../radar/attacks/layer3_timeseries_params.py | 23 +- .../attacks/layer7/summary_get_params.py | 23 +- .../layer7/summary_http_method_params.py | 23 +- .../layer7/summary_http_version_params.py | 23 +- .../layer7/summary_ip_version_params.py | 23 +- .../layer7/summary_managed_rules_params.py | 23 +- .../summary_mitigation_product_params.py | 23 +- .../layer7/timeseries_group_get_params.py | 23 +- .../timeseries_group_http_method_params.py | 23 +- .../timeseries_group_http_version_params.py | 23 +- .../timeseries_group_industry_params.py | 23 +- .../timeseries_group_ip_version_params.py | 23 +- .../timeseries_group_managed_rules_params.py | 23 +- ...eseries_group_mitigation_product_params.py | 23 +- .../timeseries_group_vertical_params.py | 23 +- .../attacks/layer7/top/ase_origin_params.py | 94 +++- .../layer7/top/location_origin_params.py | 94 +++- .../layer7/top/location_target_params.py | 94 +++- .../attacks/layer7/top_attacks_params.py | 94 +++- .../attacks/layer7/top_industry_params.py | 94 +++- .../attacks/layer7/top_vertical_params.py | 94 +++- .../radar/attacks/layer7_timeseries_params.py | 96 +++- .../radar/bgp/hijacks/event_list_params.py | 21 +- .../types/radar/bgp/ip_timeseries_params.py | 21 +- .../radar/bgp/leaks/event_list_params.py | 21 +- .../types/radar/bgp/top/ase_get_params.py | 23 +- .../types/radar/bgp/top_prefixes_params.py | 23 +- .../types/radar/bgp_timeseries_params.py | 23 +- .../connection_tampering_summary_params.py | 23 +- ...tion_tampering_timeseries_groups_params.py | 23 +- .../types/radar/dns/top_ases_params.py | 23 +- .../types/radar/dns/top_locations_params.py | 23 +- .../radar/email/routing/summary_arc_params.py | 23 +- .../email/routing/summary_dkim_params.py | 23 +- .../email/routing/summary_dmarc_params.py | 23 +- .../email/routing/summary_encrypted_params.py | 23 +- .../routing/summary_ip_version_params.py | 23 +- .../radar/email/routing/summary_spf_params.py | 23 +- .../routing/timeseries_group_arc_params.py | 23 +- .../routing/timeseries_group_dkim_params.py | 23 +- .../routing/timeseries_group_dmarc_params.py | 23 +- .../timeseries_group_encrypted_params.py | 23 +- .../timeseries_group_ip_version_params.py | 23 +- .../routing/timeseries_group_spf_params.py | 23 +- .../email/security/summary_arc_params.py | 23 +- .../email/security/summary_dkim_params.py | 23 +- .../email/security/summary_dmarc_params.py | 23 +- .../security/summary_malicious_params.py | 23 +- .../email/security/summary_spam_params.py | 23 +- .../email/security/summary_spf_params.py | 23 +- .../email/security/summary_spoof_params.py | 23 +- .../summary_threat_category_params.py | 23 +- .../security/summary_tls_version_params.py | 23 +- .../security/timeseries_group_arc_params.py | 23 +- .../security/timeseries_group_dkim_params.py | 23 +- .../security/timeseries_group_dmarc_params.py | 23 +- .../timeseries_group_malicious_params.py | 23 +- .../security/timeseries_group_spam_params.py | 23 +- .../security/timeseries_group_spf_params.py | 23 +- .../security/timeseries_group_spoof_params.py | 23 +- ...timeseries_group_threat_category_params.py | 23 +- .../timeseries_group_tls_version_params.py | 23 +- .../email/security/top/tld_get_params.py | 23 +- .../security/top/tlds/malicious_get_params.py | 23 +- .../security/top/tlds/spam_get_params.py | 23 +- .../security/top/tlds/spoof_get_params.py | 23 +- .../types/radar/http/ase_get_params.py | 23 +- .../radar/http/ases/bot_class_get_params.py | 23 +- .../http/ases/browser_family_get_params.py | 23 +- .../radar/http/ases/device_type_get_params.py | 23 +- .../radar/http/ases/http_method_get_params.py | 23 +- .../http/ases/http_protocol_get_params.py | 23 +- .../radar/http/ases/ip_version_get_params.py | 23 +- .../types/radar/http/ases/os_get_params.py | 23 +- .../radar/http/ases/tls_version_get_params.py | 23 +- .../types/radar/http/location_get_params.py | 23 +- .../http/locations/bot_class_get_params.py | 23 +- .../locations/browser_family_get_params.py | 23 +- .../http/locations/device_type_get_params.py | 23 +- .../http/locations/http_method_get_params.py | 23 +- .../locations/http_protocol_get_params.py | 23 +- .../http/locations/ip_version_get_params.py | 23 +- .../radar/http/locations/os_get_params.py | 23 +- .../http/locations/tls_version_get_params.py | 23 +- .../radar/http/summary_bot_class_params.py | 23 +- .../radar/http/summary_device_type_params.py | 23 +- .../http/summary_http_protocol_params.py | 23 +- .../radar/http/summary_http_version_params.py | 23 +- .../radar/http/summary_ip_version_params.py | 23 +- .../types/radar/http/summary_os_params.py | 23 +- .../radar/http/summary_post_quantum_params.py | 23 +- .../radar/http/summary_tls_version_params.py | 23 +- .../http/timeseries_group_bot_class_params.py | 23 +- .../timeseries_group_browser_family_params.py | 23 +- .../http/timeseries_group_browser_params.py | 23 +- .../timeseries_group_device_type_params.py | 23 +- .../timeseries_group_http_protocol_params.py | 23 +- .../timeseries_group_http_version_params.py | 23 +- .../timeseries_group_ip_version_params.py | 23 +- .../radar/http/timeseries_group_os_params.py | 23 +- .../timeseries_group_post_quantum_params.py | 23 +- .../timeseries_group_tls_version_params.py | 23 +- .../radar/http/top_browser_families_params.py | 23 +- .../types/radar/http/top_browsers_params.py | 23 +- .../types/radar/http_timeseries_params.py | 23 +- .../types/radar/netflow_timeseries_params.py | 23 +- .../types/radar/netflows/top_ases_params.py | 23 +- .../radar/netflows/top_locations_params.py | 23 +- .../types/radar/quality/iqi_summary_params.py | 23 +- .../quality/iqi_timeseries_groups_params.py | 23 +- .../radar/ranking_timeseries_groups_params.py | 23 +- .../traffic_anomalies/location_get_params.py | 21 +- .../types/radar/traffic_anomaly_get_params.py | 21 +- .../radar/verified_bots/top_bots_params.py | 23 +- .../verified_bots/top_categories_params.py | 23 +- .../api_resources/radar/as112/test_summary.py | 24 +- .../radar/as112/test_timeseries_groups.py | 24 +- tests/api_resources/radar/as112/test_top.py | 16 +- .../radar/attacks/layer3/test_summary.py | 24 +- .../attacks/layer3/test_timeseries_groups.py | 36 +- .../radar/attacks/layer3/test_top.py | 12 +- .../attacks/layer3/top/test_locations.py | 8 +- .../radar/attacks/layer7/test_summary.py | 24 +- .../attacks/layer7/test_timeseries_groups.py | 32 +- .../radar/attacks/layer7/test_top.py | 36 +- .../radar/attacks/layer7/top/test_ases.py | 12 +- .../attacks/layer7/top/test_locations.py | 24 +- .../radar/attacks/test_layer3.py | 4 +- .../radar/attacks/test_layer7.py | 12 +- tests/api_resources/radar/bgp/test_top.py | 4 +- .../api_resources/radar/bgp/top/test_ases.py | 4 +- tests/api_resources/radar/dns/test_top.py | 8 +- .../radar/email/routing/test_summary.py | 24 +- .../email/routing/test_timeseries_groups.py | 24 +- .../radar/email/security/test_summary.py | 36 +- .../email/security/test_timeseries_groups.py | 36 +- .../radar/email/security/top/test_tlds.py | 4 +- .../email/security/top/tlds/test_malicious.py | 4 +- .../email/security/top/tlds/test_spam.py | 4 +- .../email/security/top/tlds/test_spoof.py | 4 +- .../radar/http/ases/test_bot_class.py | 4 +- .../radar/http/ases/test_browser_family.py | 4 +- .../radar/http/ases/test_device_type.py | 4 +- .../radar/http/ases/test_http_method.py | 4 +- .../radar/http/ases/test_http_protocol.py | 4 +- .../radar/http/ases/test_ip_version.py | 4 +- .../api_resources/radar/http/ases/test_os.py | 4 +- .../radar/http/ases/test_tls_version.py | 4 +- .../radar/http/locations/test_bot_class.py | 4 +- .../http/locations/test_browser_family.py | 4 +- .../radar/http/locations/test_device_type.py | 4 +- .../radar/http/locations/test_http_method.py | 4 +- .../http/locations/test_http_protocol.py | 4 +- .../radar/http/locations/test_ip_version.py | 4 +- .../radar/http/locations/test_os.py | 4 +- .../radar/http/locations/test_tls_version.py | 4 +- tests/api_resources/radar/http/test_ases.py | 4 +- .../radar/http/test_locations.py | 4 +- .../api_resources/radar/http/test_summary.py | 32 +- .../radar/http/test_timeseries_groups.py | 40 +- tests/api_resources/radar/http/test_top.py | 8 +- .../api_resources/radar/netflows/test_top.py | 8 +- tests/api_resources/radar/quality/test_iqi.py | 8 +- tests/api_resources/radar/test_as112.py | 4 +- tests/api_resources/radar/test_bgp.py | 4 +- .../radar/test_connection_tampering.py | 8 +- tests/api_resources/radar/test_http.py | 4 +- tests/api_resources/radar/test_netflows.py | 4 +- tests/api_resources/radar/test_ranking.py | 4 +- .../radar/verified_bots/test_top.py | 8 +- 270 files changed, 2300 insertions(+), 9712 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3ce2c63b630..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c4b189384dd6c53416271abb9b2fe109b44c1ddbb06d3d892e56457bbe0af70.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml diff --git a/src/cloudflare/resources/radar/annotations/outages.py b/src/cloudflare/resources/radar/annotations/outages.py index f53fee61e9d..b940c62d3e9 100644 --- a/src/cloudflare/resources/radar/annotations/outages.py +++ b/src/cloudflare/resources/radar/annotations/outages.py @@ -46,24 +46,7 @@ def get( *, asn: int | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -134,24 +117,7 @@ def locations( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -222,24 +188,7 @@ async def get( *, asn: int | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -310,24 +259,7 @@ async def locations( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/as112/as112.py b/src/cloudflare/resources/radar/as112/as112.py index d9245a12e0e..001bf5096a3 100644 --- a/src/cloudflare/resources/radar/as112/as112.py +++ b/src/cloudflare/resources/radar/as112/as112.py @@ -83,26 +83,7 @@ def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -209,26 +190,7 @@ async def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/as112/summary.py b/src/cloudflare/resources/radar/as112/summary.py index a67b1833204..f09a163e607 100644 --- a/src/cloudflare/resources/radar/as112/summary.py +++ b/src/cloudflare/resources/radar/as112/summary.py @@ -58,26 +58,7 @@ def dnssec( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -156,26 +137,7 @@ def edns( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -254,26 +216,7 @@ def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -352,26 +295,7 @@ def protocol( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -450,26 +374,7 @@ def query_type( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -548,26 +453,7 @@ def response_codes( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -656,26 +542,7 @@ async def dnssec( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -754,26 +621,7 @@ async def edns( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -852,26 +700,7 @@ async def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -950,26 +779,7 @@ async def protocol( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1048,26 +858,7 @@ async def query_type( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1146,26 +937,7 @@ async def response_codes( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/as112/timeseries_groups.py b/src/cloudflare/resources/radar/as112/timeseries_groups.py index 22765f808f8..5e8483aec01 100644 --- a/src/cloudflare/resources/radar/as112/timeseries_groups.py +++ b/src/cloudflare/resources/radar/as112/timeseries_groups.py @@ -59,26 +59,7 @@ def dnssec( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -163,26 +144,7 @@ def edns( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -267,26 +229,7 @@ def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -371,26 +314,7 @@ def protocol( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -475,26 +399,7 @@ def query_type( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -579,26 +484,7 @@ def response_codes( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -696,26 +582,7 @@ async def dnssec( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -800,26 +667,7 @@ async def edns( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -904,26 +752,7 @@ async def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1008,26 +837,7 @@ async def protocol( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1112,26 +922,7 @@ async def query_type( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1216,26 +1007,7 @@ async def response_codes( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/as112/top.py b/src/cloudflare/resources/radar/as112/top.py index bf2166e991f..3135f52f389 100644 --- a/src/cloudflare/resources/radar/as112/top.py +++ b/src/cloudflare/resources/radar/as112/top.py @@ -50,26 +50,7 @@ def dnssec( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -157,26 +138,7 @@ def edns( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -264,26 +226,7 @@ def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -370,26 +313,7 @@ def locations( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -485,26 +409,7 @@ async def dnssec( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -592,26 +497,7 @@ async def edns( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -699,26 +585,7 @@ async def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -805,26 +672,7 @@ async def locations( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/attacks/layer3/layer3.py b/src/cloudflare/resources/radar/attacks/layer3/layer3.py index 22a1a7a706b..38f01fdb86a 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/layer3.py +++ b/src/cloudflare/resources/radar/attacks/layer3/layer3.py @@ -84,26 +84,7 @@ def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -232,26 +213,7 @@ async def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/attacks/layer3/summary.py b/src/cloudflare/resources/radar/attacks/layer3/summary.py index d894d181af2..b3df7e5b719 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/summary.py +++ b/src/cloudflare/resources/radar/attacks/layer3/summary.py @@ -57,26 +57,7 @@ def bitrate( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -162,26 +143,7 @@ def duration( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -268,26 +230,7 @@ def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -366,26 +309,7 @@ def ip_version( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -467,26 +391,7 @@ def protocol( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -568,26 +473,7 @@ def vector( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -683,26 +569,7 @@ async def bitrate( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -788,26 +655,7 @@ async def duration( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -894,26 +742,7 @@ async def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -992,26 +821,7 @@ async def ip_version( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1093,26 +903,7 @@ async def protocol( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1194,26 +985,7 @@ async def vector( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py b/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py index 17011e35747..5acfbac08cc 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py +++ b/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py @@ -62,26 +62,7 @@ def bitrate( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -178,26 +159,7 @@ def duration( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -295,26 +257,7 @@ def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -399,26 +342,7 @@ def industry( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -427,6 +351,7 @@ def industry( location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE", "MIN0_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. extra_headers: Headers | None = None, @@ -473,6 +398,8 @@ def industry( 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 extra_query: Add additional query parameters to the request @@ -502,6 +429,7 @@ def industry( "location": location, "name": name, "normalization": normalization, + "protocol": protocol, }, timeseries_group_industry_params.TimeseriesGroupIndustryParams, ), @@ -516,26 +444,7 @@ def ip_version( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -628,26 +537,7 @@ def protocol( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -740,26 +630,7 @@ def vector( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -861,26 +732,7 @@ def vertical( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -889,6 +741,7 @@ def vertical( location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE", "MIN0_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. extra_headers: Headers | None = None, @@ -935,6 +788,8 @@ def vertical( 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 extra_query: Add additional query parameters to the request @@ -964,6 +819,7 @@ def vertical( "location": location, "name": name, "normalization": normalization, + "protocol": protocol, }, timeseries_group_vertical_params.TimeseriesGroupVerticalParams, ), @@ -988,26 +844,7 @@ async def bitrate( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1104,26 +941,7 @@ async def duration( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1221,26 +1039,7 @@ async def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1325,26 +1124,7 @@ async def industry( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1353,6 +1133,7 @@ async def industry( location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE", "MIN0_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. extra_headers: Headers | None = None, @@ -1399,6 +1180,8 @@ async def industry( 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 extra_query: Add additional query parameters to the request @@ -1428,6 +1211,7 @@ async def industry( "location": location, "name": name, "normalization": normalization, + "protocol": protocol, }, timeseries_group_industry_params.TimeseriesGroupIndustryParams, ), @@ -1442,26 +1226,7 @@ async def ip_version( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1554,26 +1319,7 @@ async def protocol( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1666,26 +1412,7 @@ async def vector( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1787,26 +1514,7 @@ async def vertical( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1815,6 +1523,7 @@ async def vertical( location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE", "MIN0_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. extra_headers: Headers | None = None, @@ -1861,6 +1570,8 @@ async def vertical( 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 extra_query: Add additional query parameters to the request @@ -1890,6 +1601,7 @@ async def vertical( "location": location, "name": name, "normalization": normalization, + "protocol": protocol, }, timeseries_group_vertical_params.TimeseriesGroupVerticalParams, ), diff --git a/src/cloudflare/resources/radar/attacks/layer3/top/locations.py b/src/cloudflare/resources/radar/attacks/layer3/top/locations.py index 998521834a5..f4502c459c7 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/top/locations.py +++ b/src/cloudflare/resources/radar/attacks/layer3/top/locations.py @@ -46,26 +46,7 @@ def origin( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -150,26 +131,7 @@ def target( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -264,26 +226,7 @@ async def origin( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -368,26 +311,7 @@ async def target( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/attacks/layer3/top/top.py b/src/cloudflare/resources/radar/attacks/layer3/top/top.py index 42c7224e8d6..362a4b1942f 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/top/top.py +++ b/src/cloudflare/resources/radar/attacks/layer3/top/top.py @@ -59,26 +59,7 @@ def attacks( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -183,26 +164,7 @@ def industry( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -287,26 +249,7 @@ def vertical( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -405,26 +348,7 @@ async def attacks( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -529,26 +453,7 @@ async def industry( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, @@ -633,26 +538,7 @@ async def vertical( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/attacks/layer7/layer7.py b/src/cloudflare/resources/radar/attacks/layer7/layer7.py index 713c3e11de2..a758fc05c92 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/layer7.py +++ b/src/cloudflare/resources/radar/attacks/layer7/layer7.py @@ -90,29 +90,69 @@ def timeseries( | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE_CHANGE", "MIN0_MAX"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -136,7 +176,7 @@ def timeseries( For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - attack: Array of L7 attack types. + attack: This field is deprecated, please use the new `mitigationProduct`. continent: Array of comma separated list of continents (alpha-2 continent codes). Start with `-` to exclude from results. For example, `-EU,NA` excludes results from @@ -152,10 +192,18 @@ def timeseries( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. normalization: Normalization method applied. Refer to @@ -186,7 +234,11 @@ def timeseries( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "location": location, + "mitigation_product": mitigation_product, "name": name, "normalization": normalization, }, @@ -232,29 +284,69 @@ async def timeseries( | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE_CHANGE", "MIN0_MAX"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -278,7 +370,7 @@ async def timeseries( For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - attack: Array of L7 attack types. + attack: This field is deprecated, please use the new `mitigationProduct`. continent: Array of comma separated list of continents (alpha-2 continent codes). Start with `-` to exclude from results. For example, `-EU,NA` excludes results from @@ -294,10 +386,18 @@ async def timeseries( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. normalization: Normalization method applied. Refer to @@ -328,7 +428,11 @@ async def timeseries( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "location": location, + "mitigation_product": mitigation_product, "name": name, "normalization": normalization, }, diff --git a/src/cloudflare/resources/radar/attacks/layer7/summary.py b/src/cloudflare/resources/radar/attacks/layer7/summary.py index 9af8c3dd0d9..668b40c9374 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/summary.py +++ b/src/cloudflare/resources/radar/attacks/layer7/summary.py @@ -58,26 +58,7 @@ def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -156,26 +137,7 @@ def http_method( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, @@ -271,26 +233,7 @@ def http_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -436,26 +379,7 @@ def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -601,26 +525,7 @@ def managed_rules( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -770,26 +675,7 @@ def mitigation_product( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -940,26 +826,7 @@ async def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1038,26 +905,7 @@ async def http_method( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, @@ -1153,26 +1001,7 @@ async def http_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1318,26 +1147,7 @@ async def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1483,26 +1293,7 @@ async def managed_rules( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1652,26 +1443,7 @@ async def mitigation_product( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ diff --git a/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py b/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py index 35c2b923a1b..674cde10cc1 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py +++ b/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py @@ -65,26 +65,7 @@ def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -170,26 +151,7 @@ def http_method( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, @@ -296,26 +258,7 @@ def http_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -472,26 +415,7 @@ def industry( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -657,26 +581,7 @@ def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -833,26 +738,7 @@ def managed_rules( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1013,26 +899,7 @@ def mitigation_product( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1186,26 +1053,7 @@ def vertical( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1381,26 +1229,7 @@ async def get( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -1486,26 +1315,7 @@ async def http_method( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, @@ -1612,26 +1422,7 @@ async def http_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1788,26 +1579,7 @@ async def industry( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -1973,26 +1745,7 @@ async def ip_version( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -2149,26 +1902,7 @@ async def managed_rules( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -2329,26 +2063,7 @@ async def mitigation_product( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ @@ -2502,26 +2217,7 @@ async def vertical( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_method: List[ diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/ases.py b/src/cloudflare/resources/radar/attacks/layer7/top/ases.py index f6d4c1a7476..9f50e400b86 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/ases.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/ases.py @@ -45,30 +45,70 @@ def origin( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -98,12 +138,20 @@ def origin( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -128,8 +176,12 @@ def origin( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "location": location, + "mitigation_product": mitigation_product, "name": name, }, ase_origin_params.AseOriginParams, @@ -154,30 +206,70 @@ async def origin( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -207,12 +299,20 @@ async def origin( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -237,8 +337,12 @@ async def origin( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "location": location, + "mitigation_product": mitigation_product, "name": name, }, ase_origin_params.AseOriginParams, diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/locations.py b/src/cloudflare/resources/radar/attacks/layer7/top/locations.py index 033bda36fdf..3933d5470d0 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/locations.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/locations.py @@ -47,29 +47,69 @@ def origin( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -103,8 +143,16 @@ def origin( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -130,7 +178,11 @@ def origin( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, + "mitigation_product": mitigation_product, "name": name, }, location_origin_params.LocationOriginParams, @@ -145,29 +197,69 @@ def target( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -197,8 +289,16 @@ def target( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -223,7 +323,11 @@ def target( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, + "mitigation_product": mitigation_product, "name": name, }, location_target_params.LocationTargetParams, @@ -249,29 +353,69 @@ async def origin( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -305,8 +449,16 @@ async def origin( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -332,7 +484,11 @@ async def origin( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, + "mitigation_product": mitigation_product, "name": name, }, location_origin_params.LocationOriginParams, @@ -347,29 +503,69 @@ async def target( *, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -399,8 +595,16 @@ async def target( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -425,7 +629,11 @@ async def target( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, + "mitigation_product": mitigation_product, "name": name, }, location_target_params.LocationTargetParams, diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/top.py b/src/cloudflare/resources/radar/attacks/layer7/top/top.py index 7ad637c5f91..e8a536854de 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/top.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/top.py @@ -72,33 +72,73 @@ def attacks( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, limit_per_location: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | 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. @@ -135,6 +175,12 @@ def attacks( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. limit_direction: Array of attack origin/target location attack limits. Together with @@ -151,6 +197,8 @@ def attacks( magnitude: Attack magnitude can be defined by total requests mitigated or by total zones attacked. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. normalization: Normalization method applied. Refer to @@ -179,11 +227,15 @@ def attacks( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "limit_direction": limit_direction, "limit_per_location": limit_per_location, "location": location, "magnitude": magnitude, + "mitigation_product": mitigation_product, "name": name, "normalization": normalization, }, @@ -200,30 +252,70 @@ def industry( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -254,12 +346,20 @@ def industry( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -285,8 +385,12 @@ def industry( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "location": location, + "mitigation_product": mitigation_product, "name": name, }, top_industry_params.TopIndustryParams, @@ -302,30 +406,70 @@ def vertical( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -356,12 +500,20 @@ def vertical( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -387,8 +539,12 @@ def vertical( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "location": location, + "mitigation_product": mitigation_product, "name": name, }, top_vertical_params.TopVerticalParams, @@ -422,33 +578,73 @@ async def attacks( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, limit_per_location: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | 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. @@ -485,6 +681,12 @@ async def attacks( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. limit_direction: Array of attack origin/target location attack limits. Together with @@ -501,6 +703,8 @@ async def attacks( magnitude: Attack magnitude can be defined by total requests mitigated or by total zones attacked. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. normalization: Normalization method applied. Refer to @@ -529,11 +733,15 @@ async def attacks( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "limit_direction": limit_direction, "limit_per_location": limit_per_location, "location": location, "magnitude": magnitude, + "mitigation_product": mitigation_product, "name": name, "normalization": normalization, }, @@ -550,30 +758,70 @@ async def industry( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -604,12 +852,20 @@ async def industry( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -635,8 +891,12 @@ async def industry( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "location": location, + "mitigation_product": mitigation_product, "name": name, }, top_industry_params.TopIndustryParams, @@ -652,30 +912,70 @@ async def vertical( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_method: List[ Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", ] ] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, + mitigation_product: List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ] + | NotGiven = NOT_GIVEN, name: List[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. @@ -706,12 +1006,20 @@ async def vertical( format: Format results are returned in. + http_method: Filter for http method. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + limit: Limit the number of objects in the response. location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. + mitigation_product: Array of L7 mitigation products. + name: Array of names that will be used to name the series in responses. extra_headers: Send extra headers @@ -737,8 +1045,12 @@ async def vertical( "date_range": date_range, "date_start": date_start, "format": format, + "http_method": http_method, + "http_version": http_version, + "ip_version": ip_version, "limit": limit, "location": location, + "mitigation_product": mitigation_product, "name": name, }, top_vertical_params.TopVerticalParams, diff --git a/src/cloudflare/resources/radar/bgp/bgp.py b/src/cloudflare/resources/radar/bgp/bgp.py index 0b0c2aa8a06..c8719a1c2d0 100644 --- a/src/cloudflare/resources/radar/bgp/bgp.py +++ b/src/cloudflare/resources/radar/bgp/bgp.py @@ -109,26 +109,7 @@ def timeseries( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, asn: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, @@ -242,26 +223,7 @@ async def timeseries( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, asn: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/bgp/hijacks/events.py b/src/cloudflare/resources/radar/bgp/hijacks/events.py index 6700a064beb..f05e43f6ee9 100644 --- a/src/cloudflare/resources/radar/bgp/hijacks/events.py +++ b/src/cloudflare/resources/radar/bgp/hijacks/events.py @@ -42,24 +42,7 @@ def list( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, event_id: int | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -174,24 +157,7 @@ def list( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, event_id: int | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/bgp/ips.py b/src/cloudflare/resources/radar/bgp/ips.py index 62cfdacf32a..7fed750692b 100644 --- a/src/cloudflare/resources/radar/bgp/ips.py +++ b/src/cloudflare/resources/radar/bgp/ips.py @@ -45,24 +45,7 @@ def timeseries( *, asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, include_delay: bool | NotGiven = NOT_GIVEN, @@ -145,24 +128,7 @@ async def timeseries( *, asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, include_delay: bool | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/bgp/leaks/events.py b/src/cloudflare/resources/radar/bgp/leaks/events.py index 92227d0287b..3858ef130c2 100644 --- a/src/cloudflare/resources/radar/bgp/leaks/events.py +++ b/src/cloudflare/resources/radar/bgp/leaks/events.py @@ -42,24 +42,7 @@ def list( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, event_id: int | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -157,24 +140,7 @@ def list( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, event_id: int | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/bgp/top/ases.py b/src/cloudflare/resources/radar/bgp/top/ases.py index c0b8db153c0..46fee488bd1 100644 --- a/src/cloudflare/resources/radar/bgp/top/ases.py +++ b/src/cloudflare/resources/radar/bgp/top/ases.py @@ -46,26 +46,7 @@ def get( *, asn: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -209,26 +190,7 @@ async def get( *, asn: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/bgp/top/top.py b/src/cloudflare/resources/radar/bgp/top/top.py index 17826f992e9..a87beb5628c 100644 --- a/src/cloudflare/resources/radar/bgp/top/top.py +++ b/src/cloudflare/resources/radar/bgp/top/top.py @@ -57,26 +57,7 @@ def prefixes( *, asn: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -167,26 +148,7 @@ async def prefixes( *, asn: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/connection_tampering.py b/src/cloudflare/resources/radar/connection_tampering.py index 76c5a4c8512..44bc7e79514 100644 --- a/src/cloudflare/resources/radar/connection_tampering.py +++ b/src/cloudflare/resources/radar/connection_tampering.py @@ -47,26 +47,7 @@ def summary( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -146,26 +127,7 @@ def timeseries_groups( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -262,26 +224,7 @@ async def summary( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -361,26 +304,7 @@ async def timeseries_groups( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/dns/top.py b/src/cloudflare/resources/radar/dns/top.py index ea775bb8d98..a6de409e52d 100644 --- a/src/cloudflare/resources/radar/dns/top.py +++ b/src/cloudflare/resources/radar/dns/top.py @@ -48,26 +48,7 @@ def ases( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -155,26 +136,7 @@ def locations( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -271,26 +233,7 @@ async def ases( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -378,26 +321,7 @@ async def locations( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/routing/summary.py b/src/cloudflare/resources/radar/email/routing/summary.py index 574def195a1..fb1824d133c 100644 --- a/src/cloudflare/resources/radar/email/routing/summary.py +++ b/src/cloudflare/resources/radar/email/routing/summary.py @@ -56,26 +56,7 @@ def arc( self, *, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -157,26 +138,7 @@ def dkim( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -257,26 +219,7 @@ def dmarc( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -357,26 +300,7 @@ def encrypted( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -457,26 +381,7 @@ def ip_version( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -557,26 +462,7 @@ def spf( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -666,26 +552,7 @@ async def arc( self, *, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -767,26 +634,7 @@ async def dkim( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -867,26 +715,7 @@ async def dmarc( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -967,26 +796,7 @@ async def encrypted( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1067,26 +877,7 @@ async def ip_version( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1167,26 +958,7 @@ async def spf( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/routing/timeseries_groups.py b/src/cloudflare/resources/radar/email/routing/timeseries_groups.py index bffe7e21af1..81257512408 100644 --- a/src/cloudflare/resources/radar/email/routing/timeseries_groups.py +++ b/src/cloudflare/resources/radar/email/routing/timeseries_groups.py @@ -57,26 +57,7 @@ def arc( *, agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -164,26 +145,7 @@ def dkim( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -270,26 +232,7 @@ def dmarc( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -376,26 +319,7 @@ def encrypted( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -482,26 +406,7 @@ def ip_version( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -588,26 +493,7 @@ def spf( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -703,26 +589,7 @@ async def arc( *, agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -810,26 +677,7 @@ async def dkim( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -916,26 +764,7 @@ async def dmarc( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, encrypted: List[Literal["ENCRYPTED", "NOT_ENCRYPTED"]] | NotGiven = NOT_GIVEN, @@ -1022,26 +851,7 @@ async def encrypted( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1128,26 +938,7 @@ async def ip_version( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1234,26 +1025,7 @@ async def spf( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/security/summary.py b/src/cloudflare/resources/radar/email/security/summary.py index 65f3b3d8dd1..aeb6c50f64d 100644 --- a/src/cloudflare/resources/radar/email/security/summary.py +++ b/src/cloudflare/resources/radar/email/security/summary.py @@ -62,26 +62,7 @@ def arc( self, *, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -159,26 +140,7 @@ def dkim( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -255,26 +217,7 @@ def dmarc( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -351,26 +294,7 @@ def malicious( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -451,26 +375,7 @@ def spam( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -551,26 +456,7 @@ def spf( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -647,26 +533,7 @@ def spoof( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -747,26 +614,7 @@ def threat_category( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -847,26 +695,7 @@ def tls_version( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -952,26 +781,7 @@ async def arc( self, *, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1049,26 +859,7 @@ async def dkim( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1145,26 +936,7 @@ async def dmarc( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1241,26 +1013,7 @@ async def malicious( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1341,26 +1094,7 @@ async def spam( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1441,26 +1175,7 @@ async def spf( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1537,26 +1252,7 @@ async def spoof( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1637,26 +1333,7 @@ async def threat_category( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1737,26 +1414,7 @@ async def tls_version( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/security/timeseries_groups.py b/src/cloudflare/resources/radar/email/security/timeseries_groups.py index 12486f075c1..f6e2ec05ce5 100644 --- a/src/cloudflare/resources/radar/email/security/timeseries_groups.py +++ b/src/cloudflare/resources/radar/email/security/timeseries_groups.py @@ -65,26 +65,7 @@ def arc( *, agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -168,26 +149,7 @@ def dkim( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -270,26 +232,7 @@ def dmarc( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -372,26 +315,7 @@ def malicious( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -478,26 +402,7 @@ def spam( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -584,26 +489,7 @@ def spf( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -686,26 +572,7 @@ def spoof( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -792,26 +659,7 @@ def threat_category( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -900,26 +748,7 @@ def tls_version( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1011,26 +840,7 @@ async def arc( *, agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1114,26 +924,7 @@ async def dkim( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1216,26 +1007,7 @@ async def dmarc( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1318,26 +1090,7 @@ async def malicious( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1424,26 +1177,7 @@ async def spam( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1530,26 +1264,7 @@ async def spf( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1632,26 +1347,7 @@ async def spoof( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1738,26 +1434,7 @@ async def threat_category( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -1846,26 +1523,7 @@ async def tls_version( agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py b/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py index c9166b9619b..4592716dfbe 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py @@ -46,26 +46,7 @@ def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -169,26 +150,7 @@ async def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/spam.py b/src/cloudflare/resources/radar/email/security/top/tlds/spam.py index 40886bdcb09..4a9081d4e8c 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/spam.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/spam.py @@ -46,26 +46,7 @@ def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -169,26 +150,7 @@ async def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py b/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py index 49e04d09ce5..23bb1b51a2c 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py @@ -46,26 +46,7 @@ def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -169,26 +150,7 @@ async def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py b/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py index 8cc5c7e2b3b..34a194b6e7d 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py @@ -81,26 +81,7 @@ def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, @@ -213,26 +194,7 @@ async def get( *, arc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, dkim: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, dmarc: List[Literal["PASS", "NONE", "FAIL"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/ases.py b/src/cloudflare/resources/radar/http/ases/ases.py index 4666cedea05..d6d2ad58304 100644 --- a/src/cloudflare/resources/radar/http/ases/ases.py +++ b/src/cloudflare/resources/radar/http/ases/ases.py @@ -144,26 +144,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -324,26 +305,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/bot_class.py b/src/cloudflare/resources/radar/http/ases/bot_class.py index d9665ba21c1..c03bae87325 100644 --- a/src/cloudflare/resources/radar/http/ases/bot_class.py +++ b/src/cloudflare/resources/radar/http/ases/bot_class.py @@ -48,26 +48,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -198,26 +179,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/browser_family.py b/src/cloudflare/resources/radar/http/ases/browser_family.py index 93f2d1bcc91..de15a3b0458 100644 --- a/src/cloudflare/resources/radar/http/ases/browser_family.py +++ b/src/cloudflare/resources/radar/http/ases/browser_family.py @@ -48,26 +48,7 @@ def get( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -196,26 +177,7 @@ async def get( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/device_type.py b/src/cloudflare/resources/radar/http/ases/device_type.py index 3c74d3c5e77..ff5763c2b2e 100644 --- a/src/cloudflare/resources/radar/http/ases/device_type.py +++ b/src/cloudflare/resources/radar/http/ases/device_type.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, @@ -197,26 +178,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/http_method.py b/src/cloudflare/resources/radar/http/ases/http_method.py index bbf7d121de4..60a9eb8788e 100644 --- a/src/cloudflare/resources/radar/http/ases/http_method.py +++ b/src/cloudflare/resources/radar/http/ases/http_method.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -197,26 +178,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/http_protocol.py b/src/cloudflare/resources/radar/http/ases/http_protocol.py index 980a72d60c2..9758dcaba3c 100644 --- a/src/cloudflare/resources/radar/http/ases/http_protocol.py +++ b/src/cloudflare/resources/radar/http/ases/http_protocol.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -193,26 +174,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/ip_version.py b/src/cloudflare/resources/radar/http/ases/ip_version.py index 13d9e9d31a5..5893e869d28 100644 --- a/src/cloudflare/resources/radar/http/ases/ip_version.py +++ b/src/cloudflare/resources/radar/http/ases/ip_version.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -197,26 +178,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/os.py b/src/cloudflare/resources/radar/http/ases/os.py index 33c0223fddf..7cb193797b2 100644 --- a/src/cloudflare/resources/radar/http/ases/os.py +++ b/src/cloudflare/resources/radar/http/ases/os.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -196,26 +177,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/ases/tls_version.py b/src/cloudflare/resources/radar/http/ases/tls_version.py index 8b002599f70..461c710a6a9 100644 --- a/src/cloudflare/resources/radar/http/ases/tls_version.py +++ b/src/cloudflare/resources/radar/http/ases/tls_version.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -197,26 +178,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/http.py b/src/cloudflare/resources/radar/http/http.py index 9f32cbdd054..1af39552df9 100644 --- a/src/cloudflare/resources/radar/http/http.py +++ b/src/cloudflare/resources/radar/http/http.py @@ -109,26 +109,7 @@ def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -243,26 +224,7 @@ async def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/bot_class.py b/src/cloudflare/resources/radar/http/locations/bot_class.py index e19b3d4ee2e..2706a45d5e4 100644 --- a/src/cloudflare/resources/radar/http/locations/bot_class.py +++ b/src/cloudflare/resources/radar/http/locations/bot_class.py @@ -48,26 +48,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -198,26 +179,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/browser_family.py b/src/cloudflare/resources/radar/http/locations/browser_family.py index 42a6dfc2c94..59147b2bc73 100644 --- a/src/cloudflare/resources/radar/http/locations/browser_family.py +++ b/src/cloudflare/resources/radar/http/locations/browser_family.py @@ -48,26 +48,7 @@ def get( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -197,26 +178,7 @@ async def get( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/device_type.py b/src/cloudflare/resources/radar/http/locations/device_type.py index db12278738c..6548efb7524 100644 --- a/src/cloudflare/resources/radar/http/locations/device_type.py +++ b/src/cloudflare/resources/radar/http/locations/device_type.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, @@ -198,26 +179,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/http_method.py b/src/cloudflare/resources/radar/http/locations/http_method.py index c524a57a4dc..e9d4ca2e962 100644 --- a/src/cloudflare/resources/radar/http/locations/http_method.py +++ b/src/cloudflare/resources/radar/http/locations/http_method.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -198,26 +179,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/http_protocol.py b/src/cloudflare/resources/radar/http/locations/http_protocol.py index 76b7013a00d..ed5d3c645a1 100644 --- a/src/cloudflare/resources/radar/http/locations/http_protocol.py +++ b/src/cloudflare/resources/radar/http/locations/http_protocol.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -194,26 +175,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/ip_version.py b/src/cloudflare/resources/radar/http/locations/ip_version.py index 2eba4d7db23..0deeca9d177 100644 --- a/src/cloudflare/resources/radar/http/locations/ip_version.py +++ b/src/cloudflare/resources/radar/http/locations/ip_version.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -197,26 +178,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/locations.py b/src/cloudflare/resources/radar/http/locations/locations.py index 0839a8f25ae..81be28116ae 100644 --- a/src/cloudflare/resources/radar/http/locations/locations.py +++ b/src/cloudflare/resources/radar/http/locations/locations.py @@ -144,26 +144,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -324,26 +305,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/os.py b/src/cloudflare/resources/radar/http/locations/os.py index 1b89d9d2a66..3d118f38c69 100644 --- a/src/cloudflare/resources/radar/http/locations/os.py +++ b/src/cloudflare/resources/radar/http/locations/os.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -196,26 +177,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/locations/tls_version.py b/src/cloudflare/resources/radar/http/locations/tls_version.py index c1fd6d54336..fb1b79d26da 100644 --- a/src/cloudflare/resources/radar/http/locations/tls_version.py +++ b/src/cloudflare/resources/radar/http/locations/tls_version.py @@ -49,26 +49,7 @@ def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -197,26 +178,7 @@ async def get( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/summary.py b/src/cloudflare/resources/radar/http/summary.py index 12defd73b00..57596ffceba 100644 --- a/src/cloudflare/resources/radar/http/summary.py +++ b/src/cloudflare/resources/radar/http/summary.py @@ -62,26 +62,7 @@ def bot_class( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -189,26 +170,7 @@ def device_type( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, @@ -314,26 +276,7 @@ def http_protocol( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -438,26 +381,7 @@ def http_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -563,26 +487,7 @@ def ip_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -688,26 +593,7 @@ def os( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -812,26 +698,7 @@ def post_quantum( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -941,26 +808,7 @@ def tls_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1075,26 +923,7 @@ async def bot_class( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1202,26 +1031,7 @@ async def device_type( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, @@ -1327,26 +1137,7 @@ async def http_protocol( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1451,26 +1242,7 @@ async def http_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1576,26 +1348,7 @@ async def ip_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1701,26 +1454,7 @@ async def os( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1825,26 +1559,7 @@ async def post_quantum( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1954,26 +1669,7 @@ async def tls_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/timeseries_groups.py b/src/cloudflare/resources/radar/http/timeseries_groups.py index 6dcf5fd060d..cc70a7d7b0e 100644 --- a/src/cloudflare/resources/radar/http/timeseries_groups.py +++ b/src/cloudflare/resources/radar/http/timeseries_groups.py @@ -67,26 +67,7 @@ def bot_class( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -200,26 +181,7 @@ def browser( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -340,26 +302,7 @@ def browser_family( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -477,26 +420,7 @@ def device_type( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, @@ -607,26 +531,7 @@ def http_protocol( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -737,26 +642,7 @@ def http_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -868,26 +754,7 @@ def ip_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -999,26 +866,7 @@ def os( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1129,26 +977,7 @@ def post_quantum( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1264,26 +1093,7 @@ def tls_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1404,26 +1214,7 @@ async def bot_class( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1537,26 +1328,7 @@ async def browser( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1677,26 +1449,7 @@ async def browser_family( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -1814,26 +1567,7 @@ async def device_type( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, @@ -1944,26 +1678,7 @@ async def http_protocol( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -2074,26 +1789,7 @@ async def http_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -2205,26 +1901,7 @@ async def ip_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -2336,26 +2013,7 @@ async def os( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -2466,26 +2124,7 @@ async def post_quantum( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -2601,26 +2240,7 @@ async def tls_version( bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/http/top.py b/src/cloudflare/resources/radar/http/top.py index 7cd13feaadd..63140658a23 100644 --- a/src/cloudflare/resources/radar/http/top.py +++ b/src/cloudflare/resources/radar/http/top.py @@ -49,26 +49,7 @@ def browser_families( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -187,26 +168,7 @@ def browsers( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -335,26 +297,7 @@ async def browser_families( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -473,26 +416,7 @@ async def browsers( browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/netflows/netflows.py b/src/cloudflare/resources/radar/netflows/netflows.py index b82345a5b43..5453b325052 100644 --- a/src/cloudflare/resources/radar/netflows/netflows.py +++ b/src/cloudflare/resources/radar/netflows/netflows.py @@ -59,26 +59,7 @@ def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -188,26 +169,7 @@ async def timeseries( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/netflows/top.py b/src/cloudflare/resources/radar/netflows/top.py index 310e0a90323..be6a6848054 100644 --- a/src/cloudflare/resources/radar/netflows/top.py +++ b/src/cloudflare/resources/radar/netflows/top.py @@ -47,26 +47,7 @@ def ases( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -150,26 +131,7 @@ def locations( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -263,26 +225,7 @@ async def ases( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -366,26 +309,7 @@ async def locations( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/quality/iqi.py b/src/cloudflare/resources/radar/quality/iqi.py index 3a3c8ba4da3..cdae7e1963c 100644 --- a/src/cloudflare/resources/radar/quality/iqi.py +++ b/src/cloudflare/resources/radar/quality/iqi.py @@ -48,26 +48,7 @@ def summary( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -152,26 +133,7 @@ def timeseries_groups( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, interpolation: bool | NotGiven = NOT_GIVEN, @@ -274,26 +236,7 @@ async def summary( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -378,26 +321,7 @@ async def timeseries_groups( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, interpolation: bool | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/ranking/ranking.py b/src/cloudflare/resources/radar/ranking/ranking.py index fdbb566b907..f30e864a07a 100644 --- a/src/cloudflare/resources/radar/ranking/ranking.py +++ b/src/cloudflare/resources/radar/ranking/ranking.py @@ -57,26 +57,7 @@ def timeseries_groups( self, *, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, domains: List[str] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, @@ -235,26 +216,7 @@ async def timeseries_groups( self, *, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, domains: List[str] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/traffic_anomalies/locations.py b/src/cloudflare/resources/radar/traffic_anomalies/locations.py index 851686c3964..2ddaf9f649d 100644 --- a/src/cloudflare/resources/radar/traffic_anomalies/locations.py +++ b/src/cloudflare/resources/radar/traffic_anomalies/locations.py @@ -44,24 +44,7 @@ def get( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -135,24 +118,7 @@ async def get( self, *, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py b/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py index 6a24039a9aa..9c799ae0bd1 100644 --- a/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py +++ b/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py @@ -57,24 +57,7 @@ def get( *, asn: int | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -164,24 +147,7 @@ async def get( *, asn: int | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - date_range: Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - | NotGiven = NOT_GIVEN, + date_range: str | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/verified_bots/top.py b/src/cloudflare/resources/radar/verified_bots/top.py index 5b7b011891a..49c31318770 100644 --- a/src/cloudflare/resources/radar/verified_bots/top.py +++ b/src/cloudflare/resources/radar/verified_bots/top.py @@ -47,26 +47,7 @@ def bots( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -149,26 +130,7 @@ def categories( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -262,26 +224,7 @@ async def bots( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -364,26 +307,7 @@ async def categories( asn: List[str] | NotGiven = NOT_GIVEN, continent: List[str] | NotGiven = NOT_GIVEN, date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ] - | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/radar/annotations/outage_get_params.py b/src/cloudflare/types/radar/annotations/outage_get_params.py index aa809b3440f..23df4113305 100644 --- a/src/cloudflare/types/radar/annotations/outage_get_params.py +++ b/src/cloudflare/types/radar/annotations/outage_get_params.py @@ -18,26 +18,7 @@ class OutageGetParams(TypedDict, total=False): date_end: Annotated[Union[str, datetime], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[str, PropertyInfo(alias="dateRange")] """ Shorthand date ranges for the last X days - use when you don't need specific start and end dates. diff --git a/src/cloudflare/types/radar/annotations/outage_locations_params.py b/src/cloudflare/types/radar/annotations/outage_locations_params.py index 04114f7f1e9..51ae0778681 100644 --- a/src/cloudflare/types/radar/annotations/outage_locations_params.py +++ b/src/cloudflare/types/radar/annotations/outage_locations_params.py @@ -15,26 +15,7 @@ class OutageLocationsParams(TypedDict, total=False): date_end: Annotated[Union[str, datetime], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[str, PropertyInfo(alias="dateRange")] """ Shorthand date ranges for the last X days - use when you don't need specific start and end dates. diff --git a/src/cloudflare/types/radar/as112/summary_dnssec_params.py b/src/cloudflare/types/radar/as112/summary_dnssec_params.py index 2e6e80114e1..df69e836284 100644 --- a/src/cloudflare/types/radar/as112/summary_dnssec_params.py +++ b/src/cloudflare/types/radar/as112/summary_dnssec_params.py @@ -29,28 +29,7 @@ class SummaryDNSSECParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/summary_edns_params.py b/src/cloudflare/types/radar/as112/summary_edns_params.py index 0dcd9876244..aa8cb759564 100644 --- a/src/cloudflare/types/radar/as112/summary_edns_params.py +++ b/src/cloudflare/types/radar/as112/summary_edns_params.py @@ -29,28 +29,7 @@ class SummaryEdnsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/summary_ip_version_params.py b/src/cloudflare/types/radar/as112/summary_ip_version_params.py index de7208b1dbf..edf5caac4ef 100644 --- a/src/cloudflare/types/radar/as112/summary_ip_version_params.py +++ b/src/cloudflare/types/radar/as112/summary_ip_version_params.py @@ -29,28 +29,7 @@ class SummaryIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/summary_protocol_params.py b/src/cloudflare/types/radar/as112/summary_protocol_params.py index 1a3291978d2..bfe7e77315b 100644 --- a/src/cloudflare/types/radar/as112/summary_protocol_params.py +++ b/src/cloudflare/types/radar/as112/summary_protocol_params.py @@ -29,28 +29,7 @@ class SummaryProtocolParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/summary_query_type_params.py b/src/cloudflare/types/radar/as112/summary_query_type_params.py index 8493c847c6d..aea17cb0a58 100644 --- a/src/cloudflare/types/radar/as112/summary_query_type_params.py +++ b/src/cloudflare/types/radar/as112/summary_query_type_params.py @@ -29,28 +29,7 @@ class SummaryQueryTypeParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/summary_response_codes_params.py b/src/cloudflare/types/radar/as112/summary_response_codes_params.py index 259d6e96c97..9579b04766e 100644 --- a/src/cloudflare/types/radar/as112/summary_response_codes_params.py +++ b/src/cloudflare/types/radar/as112/summary_response_codes_params.py @@ -29,28 +29,7 @@ class SummaryResponseCodesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/timeseries_group_dnssec_params.py b/src/cloudflare/types/radar/as112/timeseries_group_dnssec_params.py index bda75df0747..d818ce2ddf2 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_dnssec_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_dnssec_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupDNSSECParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/timeseries_group_edns_params.py b/src/cloudflare/types/radar/as112/timeseries_group_edns_params.py index af229e41397..cde360d1e43 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_edns_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_edns_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupEdnsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/timeseries_group_ip_version_params.py b/src/cloudflare/types/radar/as112/timeseries_group_ip_version_params.py index 19c7f3eb311..54f655692fb 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_ip_version_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_ip_version_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/timeseries_group_protocol_params.py b/src/cloudflare/types/radar/as112/timeseries_group_protocol_params.py index c8d8422ca94..deb737e61b1 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_protocol_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_protocol_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupProtocolParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py b/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py index 46316c3b399..d83568fe1d3 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupQueryTypeParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py index 8709b1a2c7b..05cf4ac7fab 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupResponseCodesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/top_dnssec_params.py b/src/cloudflare/types/radar/as112/top_dnssec_params.py index b23dc9734cc..9f46b8ec011 100644 --- a/src/cloudflare/types/radar/as112/top_dnssec_params.py +++ b/src/cloudflare/types/radar/as112/top_dnssec_params.py @@ -29,28 +29,7 @@ class TopDNSSECParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/top_edns_params.py b/src/cloudflare/types/radar/as112/top_edns_params.py index 0227901b072..046c0d251b6 100644 --- a/src/cloudflare/types/radar/as112/top_edns_params.py +++ b/src/cloudflare/types/radar/as112/top_edns_params.py @@ -29,28 +29,7 @@ class TopEdnsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/top_ip_version_params.py b/src/cloudflare/types/radar/as112/top_ip_version_params.py index 051ab28787a..18ff8eb6a9b 100644 --- a/src/cloudflare/types/radar/as112/top_ip_version_params.py +++ b/src/cloudflare/types/radar/as112/top_ip_version_params.py @@ -29,28 +29,7 @@ class TopIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112/top_locations_params.py b/src/cloudflare/types/radar/as112/top_locations_params.py index ab868bf5790..74b6631d0b9 100644 --- a/src/cloudflare/types/radar/as112/top_locations_params.py +++ b/src/cloudflare/types/radar/as112/top_locations_params.py @@ -29,28 +29,7 @@ class TopLocationsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/as112_timeseries_params.py b/src/cloudflare/types/radar/as112_timeseries_params.py index 0f000b07733..c2e37c6ce35 100644 --- a/src/cloudflare/types/radar/as112_timeseries_params.py +++ b/src/cloudflare/types/radar/as112_timeseries_params.py @@ -36,28 +36,7 @@ class AS112TimeseriesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_params.py b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_params.py index c703245c195..b4d0b88d8fb 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_params.py @@ -22,28 +22,7 @@ class SummaryBitrateParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_duration_params.py b/src/cloudflare/types/radar/attacks/layer3/summary_duration_params.py index 9c54cd15ca0..615fe97285f 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_duration_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_duration_params.py @@ -22,28 +22,7 @@ class SummaryDurationParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_get_params.py b/src/cloudflare/types/radar/attacks/layer3/summary_get_params.py index c0352a255b0..fe1dae91b19 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_get_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_get_params.py @@ -29,28 +29,7 @@ class SummaryGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_params.py b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_params.py index b279abc7674..b1ab3c41730 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_params.py @@ -22,28 +22,7 @@ class SummaryIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_params.py b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_params.py index 23a1c908359..f3c6e1f2d4e 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_params.py @@ -22,28 +22,7 @@ class SummaryProtocolParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py b/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py index 6f5abe37bca..3da6f2912a7 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py @@ -22,28 +22,7 @@ class SummaryVectorParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_bitrate_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_bitrate_params.py index e93b8a5bfb5..9ef70e178ad 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_bitrate_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_bitrate_params.py @@ -29,28 +29,7 @@ class TimeseriesGroupBitrateParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_duration_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_duration_params.py index b8058d2f1c7..0ac1f04ea12 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_duration_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_duration_params.py @@ -29,28 +29,7 @@ class TimeseriesGroupDurationParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_params.py index 5a91d77b2ba..9ab69b16b82 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_params.py index 40730b2f8c0..b9474428b97 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_params.py @@ -29,28 +29,7 @@ class TimeseriesGroupIndustryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -94,3 +73,6 @@ class TimeseriesGroupIndustryParams(TypedDict, total=False): 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/timeseries_group_ip_version_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_ip_version_params.py index 1c16b165bd7..5f8b50a1f23 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_ip_version_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_ip_version_params.py @@ -29,28 +29,7 @@ class TimeseriesGroupIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_protocol_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_protocol_params.py index 8ad6e9dc2f3..c96f496eb67 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_protocol_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_protocol_params.py @@ -29,28 +29,7 @@ class TimeseriesGroupProtocolParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_params.py index 28ae6a6626f..bdd8255a84a 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_params.py @@ -29,28 +29,7 @@ class TimeseriesGroupVectorParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_params.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_params.py index 4892adb010c..4e20388b202 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_params.py @@ -29,28 +29,7 @@ class TimeseriesGroupVerticalParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -94,3 +73,6 @@ class TimeseriesGroupVerticalParams(TypedDict, total=False): 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/location_origin_params.py b/src/cloudflare/types/radar/attacks/layer3/top/location_origin_params.py index e0ccda66e05..06ae05b878d 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top/location_origin_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/top/location_origin_params.py @@ -22,28 +22,7 @@ class LocationOriginParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/top/location_target_params.py b/src/cloudflare/types/radar/attacks/layer3/top/location_target_params.py index ba4b8a829a8..4b1f0a0e41d 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top/location_target_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/top/location_target_params.py @@ -22,28 +22,7 @@ class LocationTargetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and 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 ca4d349d09a..a93d37a6324 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top_attacks_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/top_attacks_params.py @@ -22,28 +22,7 @@ class TopAttacksParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/top_industry_params.py b/src/cloudflare/types/radar/attacks/layer3/top_industry_params.py index ffb3a18362f..41360260afa 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top_industry_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/top_industry_params.py @@ -22,28 +22,7 @@ class TopIndustryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3/top_vertical_params.py b/src/cloudflare/types/radar/attacks/layer3/top_vertical_params.py index 8a423439c5f..d04759c7af9 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top_vertical_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/top_vertical_params.py @@ -22,28 +22,7 @@ class TopVerticalParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer3_timeseries_params.py b/src/cloudflare/types/radar/attacks/layer3_timeseries_params.py index b84d90410fd..61c6eb22613 100644 --- a/src/cloudflare/types/radar/attacks/layer3_timeseries_params.py +++ b/src/cloudflare/types/radar/attacks/layer3_timeseries_params.py @@ -36,28 +36,7 @@ class Layer3TimeseriesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_get_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_get_params.py index c0352a255b0..fe1dae91b19 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_get_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_get_params.py @@ -29,28 +29,7 @@ class SummaryGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py index e7b2bba3af8..6060fcfa603 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py @@ -29,28 +29,7 @@ class SummaryHTTPMethodParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_params.py index b7e7f1b7936..7a900629d0f 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_params.py @@ -29,28 +29,7 @@ class SummaryHTTPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_params.py index 750ac6fa089..9a7e6f3ccff 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_params.py @@ -29,28 +29,7 @@ class SummaryIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py index a3712a4355b..5dfedbebd51 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py @@ -29,28 +29,7 @@ class SummaryManagedRulesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py index 338b6ec6df6..4013e1ee425 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py @@ -29,28 +29,7 @@ class SummaryMitigationProductParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_params.py index 5a91d77b2ba..9ab69b16b82 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py index 0104e415659..d6ea3e4eec2 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupHTTPMethodParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_params.py index b3f57608746..f2c435b5132 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupHTTPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_params.py index 4e42768f966..274b5be39b6 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupIndustryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_ip_version_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_ip_version_params.py index fd01114679b..dfeee4f83b4 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_ip_version_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_ip_version_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py index fb54dc9e9ff..7c26f5c6c64 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupManagedRulesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py index 0c3d74fec88..7dfb3741259 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupMitigationProductParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_params.py index 71c1a4f0da0..97c91f53136 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupVerticalParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_params.py b/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_params.py index 47cd8743e1c..17099f3e08c 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_params.py @@ -22,28 +22,7 @@ class AseOriginParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -56,6 +35,67 @@ class AseOriginParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + http_method: Annotated[ + List[ + Literal[ + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", + ] + ], + PropertyInfo(alias="httpMethod"), + ] + """Filter for http method.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + limit: int """Limit the number of objects in the response.""" @@ -66,5 +106,15 @@ class AseOriginParams(TypedDict, total=False): from the US, but includes results from PT. """ + mitigation_product: Annotated[ + List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ], + PropertyInfo(alias="mitigationProduct"), + ] + """Array of L7 mitigation products.""" + name: List[str] """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/attacks/layer7/top/location_origin_params.py b/src/cloudflare/types/radar/attacks/layer7/top/location_origin_params.py index 0b71871665f..58aa33984ac 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top/location_origin_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top/location_origin_params.py @@ -29,28 +29,7 @@ class LocationOriginParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -63,8 +42,79 @@ class LocationOriginParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + http_method: Annotated[ + List[ + Literal[ + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", + ] + ], + PropertyInfo(alias="httpMethod"), + ] + """Filter for http method.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + limit: int """Limit the number of objects in the response.""" + mitigation_product: Annotated[ + List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ], + PropertyInfo(alias="mitigationProduct"), + ] + """Array of L7 mitigation products.""" + name: List[str] """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/attacks/layer7/top/location_target_params.py b/src/cloudflare/types/radar/attacks/layer7/top/location_target_params.py index cfbffac2733..50a57bfe056 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top/location_target_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top/location_target_params.py @@ -22,28 +22,7 @@ class LocationTargetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -56,8 +35,79 @@ class LocationTargetParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + http_method: Annotated[ + List[ + Literal[ + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", + ] + ], + PropertyInfo(alias="httpMethod"), + ] + """Filter for http method.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + limit: int """Limit the number of objects in the response.""" + mitigation_product: Annotated[ + List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ], + PropertyInfo(alias="mitigationProduct"), + ] + """Array of L7 mitigation products.""" + name: List[str] """Array of names that will be used to name the series in responses.""" 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 62ec38abfb3..d735b60cb91 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py @@ -29,28 +29,7 @@ class TopAttacksParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -63,6 +42,67 @@ class TopAttacksParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + http_method: Annotated[ + List[ + Literal[ + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", + ] + ], + PropertyInfo(alias="httpMethod"), + ] + """Filter for http method.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + limit: int """Limit the number of objects in the response.""" @@ -92,6 +132,16 @@ class TopAttacksParams(TypedDict, total=False): attacked. """ + mitigation_product: Annotated[ + List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ], + PropertyInfo(alias="mitigationProduct"), + ] + """Array of L7 mitigation products.""" + name: List[str] """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/attacks/layer7/top_industry_params.py b/src/cloudflare/types/radar/attacks/layer7/top_industry_params.py index 8c19fbe7fbd..54c26d71680 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_industry_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_industry_params.py @@ -29,28 +29,7 @@ class TopIndustryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -63,6 +42,67 @@ class TopIndustryParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + http_method: Annotated[ + List[ + Literal[ + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", + ] + ], + PropertyInfo(alias="httpMethod"), + ] + """Filter for http method.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + limit: int """Limit the number of objects in the response.""" @@ -73,5 +113,15 @@ class TopIndustryParams(TypedDict, total=False): from the US, but includes results from PT. """ + mitigation_product: Annotated[ + List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ], + PropertyInfo(alias="mitigationProduct"), + ] + """Array of L7 mitigation products.""" + name: List[str] """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/attacks/layer7/top_vertical_params.py b/src/cloudflare/types/radar/attacks/layer7/top_vertical_params.py index 3bd3fc5adab..cb941de5c43 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_vertical_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_vertical_params.py @@ -29,28 +29,7 @@ class TopVerticalParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -63,6 +42,67 @@ class TopVerticalParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + http_method: Annotated[ + List[ + Literal[ + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", + ] + ], + PropertyInfo(alias="httpMethod"), + ] + """Filter for http method.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + limit: int """Limit the number of objects in the response.""" @@ -73,5 +113,15 @@ class TopVerticalParams(TypedDict, total=False): from the US, but includes results from PT. """ + mitigation_product: Annotated[ + List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ], + PropertyInfo(alias="mitigationProduct"), + ] + """Array of L7 mitigation products.""" + name: List[str] """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/attacks/layer7_timeseries_params.py b/src/cloudflare/types/radar/attacks/layer7_timeseries_params.py index e4c8ea5f8c4..1808607d48b 100644 --- a/src/cloudflare/types/radar/attacks/layer7_timeseries_params.py +++ b/src/cloudflare/types/radar/attacks/layer7_timeseries_params.py @@ -29,7 +29,7 @@ class Layer7TimeseriesParams(TypedDict, total=False): attack: List[ Literal["DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION"] ] - """Array of L7 attack types.""" + """This field is deprecated, please use the new `mitigationProduct`.""" continent: List[str] """Array of comma separated list of continents (alpha-2 continent codes). @@ -41,28 +41,7 @@ class Layer7TimeseriesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and @@ -75,6 +54,67 @@ class Layer7TimeseriesParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + http_method: Annotated[ + List[ + Literal[ + "GET", + "POST", + "DELETE", + "PUT", + "HEAD", + "PURGE", + "OPTIONS", + "PROPFIND", + "MKCOL", + "PATCH", + "ACL", + "BCOPY", + "BDELETE", + "BMOVE", + "BPROPFIND", + "BPROPPATCH", + "CHECKIN", + "CHECKOUT", + "CONNECT", + "COPY", + "LABEL", + "LOCK", + "MERGE", + "MKACTIVITY", + "MKWORKSPACE", + "MOVE", + "NOTIFY", + "ORDERPATCH", + "POLL", + "PROPPATCH", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNCHECKOUT", + "UNLOCK", + "UNSUBSCRIBE", + "UPDATE", + "VERSIONCONTROL", + "BASELINECONTROL", + "XMSENUMATTS", + "RPC_OUT_DATA", + "RPC_IN_DATA", + "JSON", + "COOK", + "TRACK", + ] + ], + PropertyInfo(alias="httpMethod"), + ] + """Filter for http method.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). @@ -82,6 +122,16 @@ class Layer7TimeseriesParams(TypedDict, total=False): from the US, but includes results from PT. """ + mitigation_product: Annotated[ + List[ + Literal[ + "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" + ] + ], + PropertyInfo(alias="mitigationProduct"), + ] + """Array of L7 mitigation products.""" + name: List[str] """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/bgp/hijacks/event_list_params.py b/src/cloudflare/types/radar/bgp/hijacks/event_list_params.py index d4508e86b11..7433cf1aae5 100644 --- a/src/cloudflare/types/radar/bgp/hijacks/event_list_params.py +++ b/src/cloudflare/types/radar/bgp/hijacks/event_list_params.py @@ -15,26 +15,7 @@ class EventListParams(TypedDict, total=False): date_end: Annotated[Union[str, datetime], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[str, PropertyInfo(alias="dateRange")] """ Shorthand date ranges for the last X days - use when you don't need specific start and end dates. diff --git a/src/cloudflare/types/radar/bgp/ip_timeseries_params.py b/src/cloudflare/types/radar/bgp/ip_timeseries_params.py index 64d069dcb49..b5b47a19d65 100644 --- a/src/cloudflare/types/radar/bgp/ip_timeseries_params.py +++ b/src/cloudflare/types/radar/bgp/ip_timeseries_params.py @@ -18,26 +18,7 @@ class IPTimeseriesParams(TypedDict, total=False): date_end: Annotated[Union[str, datetime], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[str, PropertyInfo(alias="dateRange")] """ Shorthand date ranges for the last X days - use when you don't need specific start and end dates. diff --git a/src/cloudflare/types/radar/bgp/leaks/event_list_params.py b/src/cloudflare/types/radar/bgp/leaks/event_list_params.py index c67ff410944..a9773f39dfa 100644 --- a/src/cloudflare/types/radar/bgp/leaks/event_list_params.py +++ b/src/cloudflare/types/radar/bgp/leaks/event_list_params.py @@ -15,26 +15,7 @@ class EventListParams(TypedDict, total=False): date_end: Annotated[Union[str, datetime], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[str, PropertyInfo(alias="dateRange")] """ Shorthand date ranges for the last X days - use when you don't need specific start and end dates. 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 c5ea6aeafaf..0b3abb1528f 100644 --- a/src/cloudflare/types/radar/bgp/top/ase_get_params.py +++ b/src/cloudflare/types/radar/bgp/top/ase_get_params.py @@ -22,28 +22,7 @@ class AseGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/bgp/top_prefixes_params.py b/src/cloudflare/types/radar/bgp/top_prefixes_params.py index f8f71e0a887..a73c20fb3c6 100644 --- a/src/cloudflare/types/radar/bgp/top_prefixes_params.py +++ b/src/cloudflare/types/radar/bgp/top_prefixes_params.py @@ -22,28 +22,7 @@ class TopPrefixesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/bgp_timeseries_params.py b/src/cloudflare/types/radar/bgp_timeseries_params.py index 60be5fc3baf..2e6c49dd837 100644 --- a/src/cloudflare/types/radar/bgp_timeseries_params.py +++ b/src/cloudflare/types/radar/bgp_timeseries_params.py @@ -29,28 +29,7 @@ class BGPTimeseriesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/connection_tampering_summary_params.py b/src/cloudflare/types/radar/connection_tampering_summary_params.py index 816d2a69a84..8d20f6b54dd 100644 --- a/src/cloudflare/types/radar/connection_tampering_summary_params.py +++ b/src/cloudflare/types/radar/connection_tampering_summary_params.py @@ -29,28 +29,7 @@ class ConnectionTamperingSummaryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py b/src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py index e5275b8ad5d..176588e5de7 100644 --- a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py +++ b/src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py @@ -36,28 +36,7 @@ class ConnectionTamperingTimeseriesGroupsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/dns/top_ases_params.py b/src/cloudflare/types/radar/dns/top_ases_params.py index cf6d067e3f6..fed6e043884 100644 --- a/src/cloudflare/types/radar/dns/top_ases_params.py +++ b/src/cloudflare/types/radar/dns/top_ases_params.py @@ -32,28 +32,7 @@ class TopAsesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/dns/top_locations_params.py b/src/cloudflare/types/radar/dns/top_locations_params.py index e8afc5e3988..a0f8a46d7d3 100644 --- a/src/cloudflare/types/radar/dns/top_locations_params.py +++ b/src/cloudflare/types/radar/dns/top_locations_params.py @@ -32,28 +32,7 @@ class TopLocationsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/summary_arc_params.py b/src/cloudflare/types/radar/email/routing/summary_arc_params.py index 882c1d9eab3..58c3c121836 100644 --- a/src/cloudflare/types/radar/email/routing/summary_arc_params.py +++ b/src/cloudflare/types/radar/email/routing/summary_arc_params.py @@ -15,28 +15,7 @@ class SummaryARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/summary_dkim_params.py b/src/cloudflare/types/radar/email/routing/summary_dkim_params.py index 9a604a3c892..19be324942f 100644 --- a/src/cloudflare/types/radar/email/routing/summary_dkim_params.py +++ b/src/cloudflare/types/radar/email/routing/summary_dkim_params.py @@ -18,28 +18,7 @@ class SummaryDKIMParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/summary_dmarc_params.py b/src/cloudflare/types/radar/email/routing/summary_dmarc_params.py index 6bb4c73906d..f356077e043 100644 --- a/src/cloudflare/types/radar/email/routing/summary_dmarc_params.py +++ b/src/cloudflare/types/radar/email/routing/summary_dmarc_params.py @@ -18,28 +18,7 @@ class SummaryDMARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/summary_encrypted_params.py b/src/cloudflare/types/radar/email/routing/summary_encrypted_params.py index deb23b67fd7..b6553448171 100644 --- a/src/cloudflare/types/radar/email/routing/summary_encrypted_params.py +++ b/src/cloudflare/types/radar/email/routing/summary_encrypted_params.py @@ -18,28 +18,7 @@ class SummaryEncryptedParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/summary_ip_version_params.py b/src/cloudflare/types/radar/email/routing/summary_ip_version_params.py index 031548d8db4..a1e7d6396f4 100644 --- a/src/cloudflare/types/radar/email/routing/summary_ip_version_params.py +++ b/src/cloudflare/types/radar/email/routing/summary_ip_version_params.py @@ -18,28 +18,7 @@ class SummaryIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/summary_spf_params.py b/src/cloudflare/types/radar/email/routing/summary_spf_params.py index 09b77b5cdcc..f594b1931b7 100644 --- a/src/cloudflare/types/radar/email/routing/summary_spf_params.py +++ b/src/cloudflare/types/radar/email/routing/summary_spf_params.py @@ -18,28 +18,7 @@ class SummarySPFParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_arc_params.py b/src/cloudflare/types/radar/email/routing/timeseries_group_arc_params.py index 6ec8c996a71..2c950448fe6 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_arc_params.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_arc_params.py @@ -22,28 +22,7 @@ class TimeseriesGroupARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_params.py b/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_params.py index 92a54f9bbbb..28c98ab3c92 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_params.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupDKIMParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_params.py b/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_params.py index 017c0baab09..71271e551db 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_params.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupDMARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_encrypted_params.py b/src/cloudflare/types/radar/email/routing/timeseries_group_encrypted_params.py index 1a7d6141526..093524f3bbd 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_encrypted_params.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_encrypted_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupEncryptedParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_ip_version_params.py b/src/cloudflare/types/radar/email/routing/timeseries_group_ip_version_params.py index 522cbaa9b26..f264feafdc3 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_ip_version_params.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_ip_version_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_spf_params.py b/src/cloudflare/types/radar/email/routing/timeseries_group_spf_params.py index 8065d9eed1f..22168b70e9f 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_spf_params.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_spf_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupSPFParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_arc_params.py b/src/cloudflare/types/radar/email/security/summary_arc_params.py index 9ad299b59ee..b141a65af14 100644 --- a/src/cloudflare/types/radar/email/security/summary_arc_params.py +++ b/src/cloudflare/types/radar/email/security/summary_arc_params.py @@ -15,28 +15,7 @@ class SummaryARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_dkim_params.py b/src/cloudflare/types/radar/email/security/summary_dkim_params.py index 6a731169c87..f92d7545793 100644 --- a/src/cloudflare/types/radar/email/security/summary_dkim_params.py +++ b/src/cloudflare/types/radar/email/security/summary_dkim_params.py @@ -18,28 +18,7 @@ class SummaryDKIMParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_dmarc_params.py b/src/cloudflare/types/radar/email/security/summary_dmarc_params.py index 5b137bbc141..f31a3218ce0 100644 --- a/src/cloudflare/types/radar/email/security/summary_dmarc_params.py +++ b/src/cloudflare/types/radar/email/security/summary_dmarc_params.py @@ -18,28 +18,7 @@ class SummaryDMARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_malicious_params.py b/src/cloudflare/types/radar/email/security/summary_malicious_params.py index 70f9b54c64a..432685036f3 100644 --- a/src/cloudflare/types/radar/email/security/summary_malicious_params.py +++ b/src/cloudflare/types/radar/email/security/summary_malicious_params.py @@ -18,28 +18,7 @@ class SummaryMaliciousParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_spam_params.py b/src/cloudflare/types/radar/email/security/summary_spam_params.py index afef137ed42..bc535bf3aae 100644 --- a/src/cloudflare/types/radar/email/security/summary_spam_params.py +++ b/src/cloudflare/types/radar/email/security/summary_spam_params.py @@ -18,28 +18,7 @@ class SummarySpamParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_spf_params.py b/src/cloudflare/types/radar/email/security/summary_spf_params.py index ed5f1fb6398..43e4ba10cc7 100644 --- a/src/cloudflare/types/radar/email/security/summary_spf_params.py +++ b/src/cloudflare/types/radar/email/security/summary_spf_params.py @@ -18,28 +18,7 @@ class SummarySPFParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_spoof_params.py b/src/cloudflare/types/radar/email/security/summary_spoof_params.py index bb6330e3d9b..f82a3b58522 100644 --- a/src/cloudflare/types/radar/email/security/summary_spoof_params.py +++ b/src/cloudflare/types/radar/email/security/summary_spoof_params.py @@ -18,28 +18,7 @@ class SummarySpoofParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_threat_category_params.py b/src/cloudflare/types/radar/email/security/summary_threat_category_params.py index e33d9f80946..c38e50ac6b3 100644 --- a/src/cloudflare/types/radar/email/security/summary_threat_category_params.py +++ b/src/cloudflare/types/radar/email/security/summary_threat_category_params.py @@ -18,28 +18,7 @@ class SummaryThreatCategoryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/summary_tls_version_params.py b/src/cloudflare/types/radar/email/security/summary_tls_version_params.py index c6ac1125c3c..4d7362e138e 100644 --- a/src/cloudflare/types/radar/email/security/summary_tls_version_params.py +++ b/src/cloudflare/types/radar/email/security/summary_tls_version_params.py @@ -18,28 +18,7 @@ class SummaryTLSVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_arc_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_arc_params.py index 191f71e93a1..abc50a0d1c2 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_arc_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_arc_params.py @@ -22,28 +22,7 @@ class TimeseriesGroupARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_dkim_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_dkim_params.py index d7ca9182a54..25f67103fbc 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_dkim_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_dkim_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupDKIMParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_params.py index 49f05939993..b6c44355beb 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupDMARCParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_malicious_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_malicious_params.py index 13403acd4c7..4fadea1473b 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_malicious_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_malicious_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupMaliciousParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_spam_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_spam_params.py index 96c9df09aa3..cf290efb92d 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_spam_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_spam_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupSpamParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_spf_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_spf_params.py index ac8c26edf98..02c8899e043 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_spf_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_spf_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupSPFParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_spoof_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_spoof_params.py index 3279d449289..7192baec686 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_spoof_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_spoof_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupSpoofParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_threat_category_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_threat_category_params.py index dde9d094925..2db3534a333 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_threat_category_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_threat_category_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupThreatCategoryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_tls_version_params.py b/src/cloudflare/types/radar/email/security/timeseries_group_tls_version_params.py index ce4e549bd6a..84a9ada0097 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_tls_version_params.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_tls_version_params.py @@ -25,28 +25,7 @@ class TimeseriesGroupTLSVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/top/tld_get_params.py b/src/cloudflare/types/radar/email/security/top/tld_get_params.py index 6788ded0600..3921a4e597d 100644 --- a/src/cloudflare/types/radar/email/security/top/tld_get_params.py +++ b/src/cloudflare/types/radar/email/security/top/tld_get_params.py @@ -18,28 +18,7 @@ class TldGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_params.py b/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_params.py index b1c565d93fb..e1cc9a0218f 100644 --- a/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_params.py +++ b/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_params.py @@ -18,28 +18,7 @@ class MaliciousGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/top/tlds/spam_get_params.py b/src/cloudflare/types/radar/email/security/top/tlds/spam_get_params.py index 459205ae9fd..69fbfba03d0 100644 --- a/src/cloudflare/types/radar/email/security/top/tlds/spam_get_params.py +++ b/src/cloudflare/types/radar/email/security/top/tlds/spam_get_params.py @@ -18,28 +18,7 @@ class SpamGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_params.py b/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_params.py index d00cf123fbd..5750c343985 100644 --- a/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_params.py +++ b/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_params.py @@ -18,28 +18,7 @@ class SpoofGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ase_get_params.py b/src/cloudflare/types/radar/http/ase_get_params.py index 866834c70d7..811464b10b0 100644 --- a/src/cloudflare/types/radar/http/ase_get_params.py +++ b/src/cloudflare/types/radar/http/ase_get_params.py @@ -39,28 +39,7 @@ class AseGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/bot_class_get_params.py b/src/cloudflare/types/radar/http/ases/bot_class_get_params.py index cd99955cee5..59a823a180a 100644 --- a/src/cloudflare/types/radar/http/ases/bot_class_get_params.py +++ b/src/cloudflare/types/radar/http/ases/bot_class_get_params.py @@ -32,28 +32,7 @@ class BotClassGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/browser_family_get_params.py b/src/cloudflare/types/radar/http/ases/browser_family_get_params.py index e4869f37c27..ed19fdee421 100644 --- a/src/cloudflare/types/radar/http/ases/browser_family_get_params.py +++ b/src/cloudflare/types/radar/http/ases/browser_family_get_params.py @@ -36,28 +36,7 @@ class BrowserFamilyGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/device_type_get_params.py b/src/cloudflare/types/radar/http/ases/device_type_get_params.py index 4e8a4f6eef2..43e1b06c821 100644 --- a/src/cloudflare/types/radar/http/ases/device_type_get_params.py +++ b/src/cloudflare/types/radar/http/ases/device_type_get_params.py @@ -39,28 +39,7 @@ class DeviceTypeGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/http_method_get_params.py b/src/cloudflare/types/radar/http/ases/http_method_get_params.py index d32a5407d1f..fb227592965 100644 --- a/src/cloudflare/types/radar/http/ases/http_method_get_params.py +++ b/src/cloudflare/types/radar/http/ases/http_method_get_params.py @@ -39,28 +39,7 @@ class HTTPMethodGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/http_protocol_get_params.py b/src/cloudflare/types/radar/http/ases/http_protocol_get_params.py index 6286b675db5..629a3b8d8c0 100644 --- a/src/cloudflare/types/radar/http/ases/http_protocol_get_params.py +++ b/src/cloudflare/types/radar/http/ases/http_protocol_get_params.py @@ -39,28 +39,7 @@ class HTTPProtocolGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/ip_version_get_params.py b/src/cloudflare/types/radar/http/ases/ip_version_get_params.py index c39d2467c67..86ababaa79a 100644 --- a/src/cloudflare/types/radar/http/ases/ip_version_get_params.py +++ b/src/cloudflare/types/radar/http/ases/ip_version_get_params.py @@ -39,28 +39,7 @@ class IPVersionGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/os_get_params.py b/src/cloudflare/types/radar/http/ases/os_get_params.py index 300ebd78db8..12ac2d093b7 100644 --- a/src/cloudflare/types/radar/http/ases/os_get_params.py +++ b/src/cloudflare/types/radar/http/ases/os_get_params.py @@ -39,28 +39,7 @@ class OSGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/ases/tls_version_get_params.py b/src/cloudflare/types/radar/http/ases/tls_version_get_params.py index f5bb8d7ce65..050045d800f 100644 --- a/src/cloudflare/types/radar/http/ases/tls_version_get_params.py +++ b/src/cloudflare/types/radar/http/ases/tls_version_get_params.py @@ -39,28 +39,7 @@ class TLSVersionGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/location_get_params.py b/src/cloudflare/types/radar/http/location_get_params.py index 7f57f7d7d12..1459dbe0e58 100644 --- a/src/cloudflare/types/radar/http/location_get_params.py +++ b/src/cloudflare/types/radar/http/location_get_params.py @@ -39,28 +39,7 @@ class LocationGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/bot_class_get_params.py b/src/cloudflare/types/radar/http/locations/bot_class_get_params.py index cd99955cee5..59a823a180a 100644 --- a/src/cloudflare/types/radar/http/locations/bot_class_get_params.py +++ b/src/cloudflare/types/radar/http/locations/bot_class_get_params.py @@ -32,28 +32,7 @@ class BotClassGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/browser_family_get_params.py b/src/cloudflare/types/radar/http/locations/browser_family_get_params.py index e4869f37c27..ed19fdee421 100644 --- a/src/cloudflare/types/radar/http/locations/browser_family_get_params.py +++ b/src/cloudflare/types/radar/http/locations/browser_family_get_params.py @@ -36,28 +36,7 @@ class BrowserFamilyGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/device_type_get_params.py b/src/cloudflare/types/radar/http/locations/device_type_get_params.py index 4e8a4f6eef2..43e1b06c821 100644 --- a/src/cloudflare/types/radar/http/locations/device_type_get_params.py +++ b/src/cloudflare/types/radar/http/locations/device_type_get_params.py @@ -39,28 +39,7 @@ class DeviceTypeGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/http_method_get_params.py b/src/cloudflare/types/radar/http/locations/http_method_get_params.py index d32a5407d1f..fb227592965 100644 --- a/src/cloudflare/types/radar/http/locations/http_method_get_params.py +++ b/src/cloudflare/types/radar/http/locations/http_method_get_params.py @@ -39,28 +39,7 @@ class HTTPMethodGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/http_protocol_get_params.py b/src/cloudflare/types/radar/http/locations/http_protocol_get_params.py index 6286b675db5..629a3b8d8c0 100644 --- a/src/cloudflare/types/radar/http/locations/http_protocol_get_params.py +++ b/src/cloudflare/types/radar/http/locations/http_protocol_get_params.py @@ -39,28 +39,7 @@ class HTTPProtocolGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/ip_version_get_params.py b/src/cloudflare/types/radar/http/locations/ip_version_get_params.py index c39d2467c67..86ababaa79a 100644 --- a/src/cloudflare/types/radar/http/locations/ip_version_get_params.py +++ b/src/cloudflare/types/radar/http/locations/ip_version_get_params.py @@ -39,28 +39,7 @@ class IPVersionGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/os_get_params.py b/src/cloudflare/types/radar/http/locations/os_get_params.py index 300ebd78db8..12ac2d093b7 100644 --- a/src/cloudflare/types/radar/http/locations/os_get_params.py +++ b/src/cloudflare/types/radar/http/locations/os_get_params.py @@ -39,28 +39,7 @@ class OSGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/locations/tls_version_get_params.py b/src/cloudflare/types/radar/http/locations/tls_version_get_params.py index f5bb8d7ce65..050045d800f 100644 --- a/src/cloudflare/types/radar/http/locations/tls_version_get_params.py +++ b/src/cloudflare/types/radar/http/locations/tls_version_get_params.py @@ -39,28 +39,7 @@ class TLSVersionGetParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_bot_class_params.py b/src/cloudflare/types/radar/http/summary_bot_class_params.py index 6f9c8158410..fcd244197a8 100644 --- a/src/cloudflare/types/radar/http/summary_bot_class_params.py +++ b/src/cloudflare/types/radar/http/summary_bot_class_params.py @@ -29,28 +29,7 @@ class SummaryBotClassParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_device_type_params.py b/src/cloudflare/types/radar/http/summary_device_type_params.py index 899ff846953..c0a7a7664f2 100644 --- a/src/cloudflare/types/radar/http/summary_device_type_params.py +++ b/src/cloudflare/types/radar/http/summary_device_type_params.py @@ -36,28 +36,7 @@ class SummaryDeviceTypeParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_http_protocol_params.py b/src/cloudflare/types/radar/http/summary_http_protocol_params.py index d7dbe0cd03d..ca05adc80b4 100644 --- a/src/cloudflare/types/radar/http/summary_http_protocol_params.py +++ b/src/cloudflare/types/radar/http/summary_http_protocol_params.py @@ -36,28 +36,7 @@ class SummaryHTTPProtocolParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_http_version_params.py b/src/cloudflare/types/radar/http/summary_http_version_params.py index 03d81296e08..f103dfb0592 100644 --- a/src/cloudflare/types/radar/http/summary_http_version_params.py +++ b/src/cloudflare/types/radar/http/summary_http_version_params.py @@ -36,28 +36,7 @@ class SummaryHTTPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_ip_version_params.py b/src/cloudflare/types/radar/http/summary_ip_version_params.py index 4e513e981b6..5d135a39310 100644 --- a/src/cloudflare/types/radar/http/summary_ip_version_params.py +++ b/src/cloudflare/types/radar/http/summary_ip_version_params.py @@ -36,28 +36,7 @@ class SummaryIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_os_params.py b/src/cloudflare/types/radar/http/summary_os_params.py index d96f19b91ef..f475ca9335f 100644 --- a/src/cloudflare/types/radar/http/summary_os_params.py +++ b/src/cloudflare/types/radar/http/summary_os_params.py @@ -36,28 +36,7 @@ class SummaryOSParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_post_quantum_params.py b/src/cloudflare/types/radar/http/summary_post_quantum_params.py index d62ab293bb9..e9c7b6195d3 100644 --- a/src/cloudflare/types/radar/http/summary_post_quantum_params.py +++ b/src/cloudflare/types/radar/http/summary_post_quantum_params.py @@ -36,28 +36,7 @@ class SummaryPostQuantumParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/summary_tls_version_params.py b/src/cloudflare/types/radar/http/summary_tls_version_params.py index 9b3ed92b121..d158f1f43a6 100644 --- a/src/cloudflare/types/radar/http/summary_tls_version_params.py +++ b/src/cloudflare/types/radar/http/summary_tls_version_params.py @@ -36,28 +36,7 @@ class SummaryTLSVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_bot_class_params.py b/src/cloudflare/types/radar/http/timeseries_group_bot_class_params.py index 34f57fd9882..c356954fbc4 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_bot_class_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_bot_class_params.py @@ -36,28 +36,7 @@ class TimeseriesGroupBotClassParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py b/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py index 6abc3d5be70..df17101636c 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupBrowserFamilyParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_browser_params.py b/src/cloudflare/types/radar/http/timeseries_group_browser_params.py index a119176345b..7b2bdbd2ab0 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_browser_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_browser_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupBrowserParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_device_type_params.py b/src/cloudflare/types/radar/http/timeseries_group_device_type_params.py index 13b1c05f556..4e44b25d6cb 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_device_type_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_device_type_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupDeviceTypeParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_http_protocol_params.py b/src/cloudflare/types/radar/http/timeseries_group_http_protocol_params.py index de9c88b0507..ba7ee2c31aa 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_http_protocol_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_http_protocol_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupHTTPProtocolParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_http_version_params.py b/src/cloudflare/types/radar/http/timeseries_group_http_version_params.py index 1f3db28b16d..97e2dbca21e 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_http_version_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_http_version_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupHTTPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_ip_version_params.py b/src/cloudflare/types/radar/http/timeseries_group_ip_version_params.py index 88d48881136..6c5aa48d095 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_ip_version_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_ip_version_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupIPVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_os_params.py b/src/cloudflare/types/radar/http/timeseries_group_os_params.py index 13d7bd856f8..229e0d9ff31 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_os_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_os_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupOSParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_post_quantum_params.py b/src/cloudflare/types/radar/http/timeseries_group_post_quantum_params.py index 09fa9317b8d..486a7428ed3 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_post_quantum_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_post_quantum_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupPostQuantumParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/timeseries_group_tls_version_params.py b/src/cloudflare/types/radar/http/timeseries_group_tls_version_params.py index a5145f9cc8c..8fef3fd1627 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_tls_version_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_tls_version_params.py @@ -43,28 +43,7 @@ class TimeseriesGroupTLSVersionParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/top_browser_families_params.py b/src/cloudflare/types/radar/http/top_browser_families_params.py index 53bf111abab..24900559bc1 100644 --- a/src/cloudflare/types/radar/http/top_browser_families_params.py +++ b/src/cloudflare/types/radar/http/top_browser_families_params.py @@ -39,28 +39,7 @@ class TopBrowserFamiliesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http/top_browsers_params.py b/src/cloudflare/types/radar/http/top_browsers_params.py index 1454f2d68e7..3f5e1bf9caf 100644 --- a/src/cloudflare/types/radar/http/top_browsers_params.py +++ b/src/cloudflare/types/radar/http/top_browsers_params.py @@ -39,28 +39,7 @@ class TopBrowsersParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/http_timeseries_params.py b/src/cloudflare/types/radar/http_timeseries_params.py index a11c86f05f2..d498561809b 100644 --- a/src/cloudflare/types/radar/http_timeseries_params.py +++ b/src/cloudflare/types/radar/http_timeseries_params.py @@ -36,28 +36,7 @@ class HTTPTimeseriesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/netflow_timeseries_params.py b/src/cloudflare/types/radar/netflow_timeseries_params.py index 57515e42086..4b0bc3ba324 100644 --- a/src/cloudflare/types/radar/netflow_timeseries_params.py +++ b/src/cloudflare/types/radar/netflow_timeseries_params.py @@ -36,28 +36,7 @@ class NetflowTimeseriesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/netflows/top_ases_params.py b/src/cloudflare/types/radar/netflows/top_ases_params.py index 957c657d194..951cd0fb34e 100644 --- a/src/cloudflare/types/radar/netflows/top_ases_params.py +++ b/src/cloudflare/types/radar/netflows/top_ases_params.py @@ -29,28 +29,7 @@ class TopAsesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/netflows/top_locations_params.py b/src/cloudflare/types/radar/netflows/top_locations_params.py index ab868bf5790..74b6631d0b9 100644 --- a/src/cloudflare/types/radar/netflows/top_locations_params.py +++ b/src/cloudflare/types/radar/netflows/top_locations_params.py @@ -29,28 +29,7 @@ class TopLocationsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/quality/iqi_summary_params.py b/src/cloudflare/types/radar/quality/iqi_summary_params.py index dcc5c5141cc..1de09c36ab0 100644 --- a/src/cloudflare/types/radar/quality/iqi_summary_params.py +++ b/src/cloudflare/types/radar/quality/iqi_summary_params.py @@ -32,28 +32,7 @@ class IQISummaryParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/quality/iqi_timeseries_groups_params.py b/src/cloudflare/types/radar/quality/iqi_timeseries_groups_params.py index 7fded5184e0..6923ba58c7c 100644 --- a/src/cloudflare/types/radar/quality/iqi_timeseries_groups_params.py +++ b/src/cloudflare/types/radar/quality/iqi_timeseries_groups_params.py @@ -39,28 +39,7 @@ class IQITimeseriesGroupsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/ranking_timeseries_groups_params.py b/src/cloudflare/types/radar/ranking_timeseries_groups_params.py index f76604650f4..f9f165cc336 100644 --- a/src/cloudflare/types/radar/ranking_timeseries_groups_params.py +++ b/src/cloudflare/types/radar/ranking_timeseries_groups_params.py @@ -15,28 +15,7 @@ class RankingTimeseriesGroupsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/traffic_anomalies/location_get_params.py b/src/cloudflare/types/radar/traffic_anomalies/location_get_params.py index 6b15edda53b..bd0ebc748dd 100644 --- a/src/cloudflare/types/radar/traffic_anomalies/location_get_params.py +++ b/src/cloudflare/types/radar/traffic_anomalies/location_get_params.py @@ -15,26 +15,7 @@ class LocationGetParams(TypedDict, total=False): date_end: Annotated[Union[str, datetime], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[str, PropertyInfo(alias="dateRange")] """ Shorthand date ranges for the last X days - use when you don't need specific start and end dates. diff --git a/src/cloudflare/types/radar/traffic_anomaly_get_params.py b/src/cloudflare/types/radar/traffic_anomaly_get_params.py index 263839ec1bd..0fae350c54c 100644 --- a/src/cloudflare/types/radar/traffic_anomaly_get_params.py +++ b/src/cloudflare/types/radar/traffic_anomaly_get_params.py @@ -18,26 +18,7 @@ class TrafficAnomalyGetParams(TypedDict, total=False): date_end: Annotated[Union[str, datetime], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[str, PropertyInfo(alias="dateRange")] """ Shorthand date ranges for the last X days - use when you don't need specific start and end dates. diff --git a/src/cloudflare/types/radar/verified_bots/top_bots_params.py b/src/cloudflare/types/radar/verified_bots/top_bots_params.py index fda85d34cc0..5eb7fcda9cc 100644 --- a/src/cloudflare/types/radar/verified_bots/top_bots_params.py +++ b/src/cloudflare/types/radar/verified_bots/top_bots_params.py @@ -29,28 +29,7 @@ class TopBotsParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/src/cloudflare/types/radar/verified_bots/top_categories_params.py b/src/cloudflare/types/radar/verified_bots/top_categories_params.py index 2e736ed36da..70f3ced1ddc 100644 --- a/src/cloudflare/types/radar/verified_bots/top_categories_params.py +++ b/src/cloudflare/types/radar/verified_bots/top_categories_params.py @@ -29,28 +29,7 @@ class TopCategoriesParams(TypedDict, total=False): date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] """End of the date range (inclusive).""" - date_range: Annotated[ - List[ - Literal[ - "1d", - "2d", - "7d", - "14d", - "28d", - "12w", - "24w", - "52w", - "1dControl", - "2dControl", - "7dControl", - "14dControl", - "28dControl", - "12wControl", - "24wControl", - ] - ], - PropertyInfo(alias="dateRange"), - ] + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] """ For example, use `7d` and `7dControl` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and diff --git a/tests/api_resources/radar/as112/test_summary.py b/tests/api_resources/radar/as112/test_summary.py index 13d0bdbf800..3778d9fba55 100644 --- a/tests/api_resources/radar/as112/test_summary.py +++ b/tests/api_resources/radar/as112/test_summary.py @@ -40,7 +40,7 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -87,7 +87,7 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -134,7 +134,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -181,7 +181,7 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -228,7 +228,7 @@ def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -275,7 +275,7 @@ def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -326,7 +326,7 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -373,7 +373,7 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -420,7 +420,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -467,7 +467,7 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -514,7 +514,7 @@ async def test_method_query_type_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -561,7 +561,7 @@ async def test_method_response_codes_with_all_params(self, async_client: AsyncCl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/as112/test_timeseries_groups.py b/tests/api_resources/radar/as112/test_timeseries_groups.py index 38ec1d21891..fd9b0c69959 100644 --- a/tests/api_resources/radar/as112/test_timeseries_groups.py +++ b/tests/api_resources/radar/as112/test_timeseries_groups.py @@ -41,7 +41,7 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -89,7 +89,7 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -137,7 +137,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -185,7 +185,7 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -233,7 +233,7 @@ def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -281,7 +281,7 @@ def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -333,7 +333,7 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -381,7 +381,7 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -429,7 +429,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -477,7 +477,7 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -525,7 +525,7 @@ async def test_method_query_type_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -573,7 +573,7 @@ async def test_method_response_codes_with_all_params(self, async_client: AsyncCl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/as112/test_top.py b/tests/api_resources/radar/as112/test_top.py index 81ffe5314d8..43a3546a5de 100644 --- a/tests/api_resources/radar/as112/test_top.py +++ b/tests/api_resources/radar/as112/test_top.py @@ -41,7 +41,7 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -96,7 +96,7 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -151,7 +151,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -203,7 +203,7 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -258,7 +258,7 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -313,7 +313,7 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -368,7 +368,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -420,7 +420,7 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/attacks/layer3/test_summary.py b/tests/api_resources/radar/attacks/layer3/test_summary.py index 4b0fa3e5290..0e77b0b96fb 100644 --- a/tests/api_resources/radar/attacks/layer3/test_summary.py +++ b/tests/api_resources/radar/attacks/layer3/test_summary.py @@ -39,7 +39,7 @@ def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -88,7 +88,7 @@ def test_method_duration_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -138,7 +138,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -184,7 +184,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -232,7 +232,7 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -280,7 +280,7 @@ def test_method_vector_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -333,7 +333,7 @@ async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflar parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -382,7 +382,7 @@ async def test_method_duration_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -432,7 +432,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -478,7 +478,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -526,7 +526,7 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -574,7 +574,7 @@ async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py index 1dd04286948..7463f67dbf3 100644 --- a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py @@ -42,7 +42,7 @@ def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -93,7 +93,7 @@ def test_method_duration_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -145,7 +145,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -192,7 +192,7 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -205,6 +205,7 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: location=["string", "string", "string"], name=["string", "string", "string"], normalization="PERCENTAGE", + protocol=["UDP", "TCP", "ICMP"], ) assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) @@ -243,7 +244,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -293,7 +294,7 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -343,7 +344,7 @@ def test_method_vector_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -395,7 +396,7 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -408,6 +409,7 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: location=["string", "string", "string"], name=["string", "string", "string"], normalization="PERCENTAGE", + protocol=["UDP", "TCP", "ICMP"], ) assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) @@ -450,7 +452,7 @@ async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflar parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -501,7 +503,7 @@ async def test_method_duration_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -553,7 +555,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -600,7 +602,7 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -613,6 +615,7 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla location=["string", "string", "string"], name=["string", "string", "string"], normalization="PERCENTAGE", + protocol=["UDP", "TCP", "ICMP"], ) assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) @@ -651,7 +654,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -701,7 +704,7 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -751,7 +754,7 @@ async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -803,7 +806,7 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -816,6 +819,7 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla location=["string", "string", "string"], name=["string", "string", "string"], normalization="PERCENTAGE", + protocol=["UDP", "TCP", "ICMP"], ) assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) diff --git a/tests/api_resources/radar/attacks/layer3/test_top.py b/tests/api_resources/radar/attacks/layer3/test_top.py index 923af0d31f9..696f58eafed 100644 --- a/tests/api_resources/radar/attacks/layer3/test_top.py +++ b/tests/api_resources/radar/attacks/layer3/test_top.py @@ -36,7 +36,7 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -88,7 +88,7 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -137,7 +137,7 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -190,7 +190,7 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -242,7 +242,7 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -291,7 +291,7 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/attacks/layer3/top/test_locations.py b/tests/api_resources/radar/attacks/layer3/top/test_locations.py index f1848af7b27..a0e56083ec6 100644 --- a/tests/api_resources/radar/attacks/layer3/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer3/top/test_locations.py @@ -35,7 +35,7 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -84,7 +84,7 @@ def test_method_target_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -137,7 +137,7 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -186,7 +186,7 @@ async def test_method_target_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/attacks/layer7/test_summary.py b/tests/api_resources/radar/attacks/layer7/test_summary.py index c8f4159e08c..b94343f2fa0 100644 --- a/tests/api_resources/radar/attacks/layer7/test_summary.py +++ b/tests/api_resources/radar/attacks/layer7/test_summary.py @@ -40,7 +40,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -87,7 +87,7 @@ def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -137,7 +137,7 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -187,7 +187,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -237,7 +237,7 @@ def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -288,7 +288,7 @@ def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -342,7 +342,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -389,7 +389,7 @@ async def test_method_http_method_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -439,7 +439,7 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -489,7 +489,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -539,7 +539,7 @@ async def test_method_managed_rules_with_all_params(self, async_client: AsyncClo parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -590,7 +590,7 @@ async def test_method_mitigation_product_with_all_params(self, async_client: Asy parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py index 99f8be5a802..31dcbe0283b 100644 --- a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py @@ -43,7 +43,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -91,7 +91,7 @@ def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -143,7 +143,7 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -195,7 +195,7 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -249,7 +249,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -301,7 +301,7 @@ def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -354,7 +354,7 @@ def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -406,7 +406,7 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -464,7 +464,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -512,7 +512,7 @@ async def test_method_http_method_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -564,7 +564,7 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -616,7 +616,7 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -670,7 +670,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -722,7 +722,7 @@ async def test_method_managed_rules_with_all_params(self, async_client: AsyncClo parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -775,7 +775,7 @@ async def test_method_mitigation_product_with_all_params(self, async_client: Asy parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -827,7 +827,7 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/attacks/layer7/test_top.py b/tests/api_resources/radar/attacks/layer7/test_top.py index 36016747df4..57fbfb1852d 100644 --- a/tests/api_resources/radar/attacks/layer7/test_top.py +++ b/tests/api_resources/radar/attacks/layer7/test_top.py @@ -37,18 +37,22 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, limit_direction="ORIGIN", limit_per_location=10, location=["string", "string", "string"], magnitude="MITIGATED_REQUESTS", + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], normalization="PERCENTAGE", ) @@ -89,15 +93,19 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(TopIndustryResponse, top, path=["response"]) @@ -137,15 +145,19 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(TopVerticalResponse, top, path=["response"]) @@ -189,18 +201,22 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, limit_direction="ORIGIN", limit_per_location=10, location=["string", "string", "string"], magnitude="MITIGATED_REQUESTS", + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], normalization="PERCENTAGE", ) @@ -241,15 +257,19 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(TopIndustryResponse, top, path=["response"]) @@ -289,15 +309,19 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(TopVerticalResponse, top, path=["response"]) diff --git a/tests/api_resources/radar/attacks/layer7/top/test_ases.py b/tests/api_resources/radar/attacks/layer7/top/test_ases.py index afa9610bd1a..3eac5b1b0fc 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_ases.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_ases.py @@ -32,15 +32,19 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(AseOriginResponse, ase, path=["response"]) @@ -83,15 +87,19 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(AseOriginResponse, ase, path=["response"]) diff --git a/tests/api_resources/radar/attacks/layer7/top/test_locations.py b/tests/api_resources/radar/attacks/layer7/top/test_locations.py index e1482281e22..9dbd50722a2 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_locations.py @@ -36,14 +36,18 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(LocationOriginResponse, location, path=["response"]) @@ -82,14 +86,18 @@ def test_method_target_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(LocationTargetResponse, location, path=["response"]) @@ -133,14 +141,18 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(LocationOriginResponse, location, path=["response"]) @@ -179,14 +191,18 @@ async def test_method_target_with_all_params(self, async_client: AsyncCloudflare parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], limit=5, + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], ) assert_matches_type(LocationTargetResponse, location, path=["response"]) diff --git a/tests/api_resources/radar/attacks/test_layer3.py b/tests/api_resources/radar/attacks/test_layer3.py index bdcdabdb226..b5284733f5b 100644 --- a/tests/api_resources/radar/attacks/test_layer3.py +++ b/tests/api_resources/radar/attacks/test_layer3.py @@ -34,7 +34,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -91,7 +91,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/attacks/test_layer7.py b/tests/api_resources/radar/attacks/test_layer7.py index 5f4c4fbdb19..b5fab2f2768 100644 --- a/tests/api_resources/radar/attacks/test_layer7.py +++ b/tests/api_resources/radar/attacks/test_layer7.py @@ -35,14 +35,18 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], normalization="MIN0_MAX", ) @@ -89,14 +93,18 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], format="JSON", + http_method=["GET", "POST", "DELETE"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], location=["string", "string", "string"], + mitigation_product=["DDOS", "WAF", "BOT_MANAGEMENT"], name=["string", "string", "string"], normalization="MIN0_MAX", ) diff --git a/tests/api_resources/radar/bgp/test_top.py b/tests/api_resources/radar/bgp/test_top.py index aabb2c05533..efd3d739ed2 100644 --- a/tests/api_resources/radar/bgp/test_top.py +++ b/tests/api_resources/radar/bgp/test_top.py @@ -32,7 +32,7 @@ def test_method_prefixes_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -83,7 +83,7 @@ async def test_method_prefixes_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/bgp/top/test_ases.py b/tests/api_resources/radar/bgp/top/test_ases.py index b9e15f5e751..da303ce9b72 100644 --- a/tests/api_resources/radar/bgp/top/test_ases.py +++ b/tests/api_resources/radar/bgp/top/test_ases.py @@ -32,7 +32,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -137,7 +137,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/dns/test_top.py b/tests/api_resources/radar/dns/test_top.py index f9c7f770b64..b202d6868f9 100644 --- a/tests/api_resources/radar/dns/test_top.py +++ b/tests/api_resources/radar/dns/test_top.py @@ -36,7 +36,7 @@ def test_method_ases_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -91,7 +91,7 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -150,7 +150,7 @@ async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -205,7 +205,7 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/routing/test_summary.py b/tests/api_resources/radar/email/routing/test_summary.py index 23fa3d37588..ec3ee1bd774 100644 --- a/tests/api_resources/radar/email/routing/test_summary.py +++ b/tests/api_resources/radar/email/routing/test_summary.py @@ -38,7 +38,7 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -88,7 +88,7 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -137,7 +137,7 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -186,7 +186,7 @@ def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -235,7 +235,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -284,7 +284,7 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -336,7 +336,7 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -386,7 +386,7 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -435,7 +435,7 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -484,7 +484,7 @@ async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -533,7 +533,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -582,7 +582,7 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/routing/test_timeseries_groups.py b/tests/api_resources/radar/email/routing/test_timeseries_groups.py index c75e3da7701..ea7f67c70a0 100644 --- a/tests/api_resources/radar/email/routing/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/routing/test_timeseries_groups.py @@ -39,7 +39,7 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -90,7 +90,7 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -140,7 +140,7 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -190,7 +190,7 @@ def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -240,7 +240,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -290,7 +290,7 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -343,7 +343,7 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -394,7 +394,7 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -444,7 +444,7 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -494,7 +494,7 @@ async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -544,7 +544,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -594,7 +594,7 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/security/test_summary.py b/tests/api_resources/radar/email/security/test_summary.py index 4fb28b76274..c46974d06b0 100644 --- a/tests/api_resources/radar/email/security/test_summary.py +++ b/tests/api_resources/radar/email/security/test_summary.py @@ -41,7 +41,7 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -90,7 +90,7 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -138,7 +138,7 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -186,7 +186,7 @@ def test_method_malicious_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -235,7 +235,7 @@ def test_method_spam_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -284,7 +284,7 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -332,7 +332,7 @@ def test_method_spoof_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -381,7 +381,7 @@ def test_method_threat_category_with_all_params(self, client: Cloudflare) -> Non parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -430,7 +430,7 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -481,7 +481,7 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -530,7 +530,7 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -578,7 +578,7 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -626,7 +626,7 @@ async def test_method_malicious_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -675,7 +675,7 @@ async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -724,7 +724,7 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -772,7 +772,7 @@ async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -821,7 +821,7 @@ async def test_method_threat_category_with_all_params(self, async_client: AsyncC parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -870,7 +870,7 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/security/test_timeseries_groups.py b/tests/api_resources/radar/email/security/test_timeseries_groups.py index b9b4674e1e2..a917102ae45 100644 --- a/tests/api_resources/radar/email/security/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/security/test_timeseries_groups.py @@ -42,7 +42,7 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -92,7 +92,7 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -141,7 +141,7 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -190,7 +190,7 @@ def test_method_malicious_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -240,7 +240,7 @@ def test_method_spam_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -290,7 +290,7 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -339,7 +339,7 @@ def test_method_spoof_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -389,7 +389,7 @@ def test_method_threat_category_with_all_params(self, client: Cloudflare) -> Non parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -439,7 +439,7 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -491,7 +491,7 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -541,7 +541,7 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -590,7 +590,7 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -639,7 +639,7 @@ async def test_method_malicious_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -689,7 +689,7 @@ async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -739,7 +739,7 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -788,7 +788,7 @@ async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -838,7 +838,7 @@ async def test_method_threat_category_with_all_params(self, async_client: AsyncC parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -888,7 +888,7 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/security/top/test_tlds.py b/tests/api_resources/radar/email/security/top/test_tlds.py index f0307596a1a..fb71286f8f9 100644 --- a/tests/api_resources/radar/email/security/top/test_tlds.py +++ b/tests/api_resources/radar/email/security/top/test_tlds.py @@ -32,7 +32,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -87,7 +87,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py index 290d8768747..52b80c305fa 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py @@ -35,7 +35,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -97,7 +97,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spam.py b/tests/api_resources/radar/email/security/top/tlds/test_spam.py index 4991fa622eb..b1d72e3f234 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spam.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spam.py @@ -35,7 +35,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -97,7 +97,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py index 3800432f585..e18cd2bc350 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py @@ -35,7 +35,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -97,7 +97,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_bot_class.py b/tests/api_resources/radar/http/ases/test_bot_class.py index 298efb20286..564e181cc75 100644 --- a/tests/api_resources/radar/http/ases/test_bot_class.py +++ b/tests/api_resources/radar/http/ases/test_bot_class.py @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -103,7 +103,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_browser_family.py b/tests/api_resources/radar/http/ases/test_browser_family.py index 2de13ca3b67..e518c1a525c 100644 --- a/tests/api_resources/radar/http/ases/test_browser_family.py +++ b/tests/api_resources/radar/http/ases/test_browser_family.py @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -103,7 +103,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_device_type.py b/tests/api_resources/radar/http/ases/test_device_type.py index 6226975cd88..18a6ccfcaa8 100644 --- a/tests/api_resources/radar/http/ases/test_device_type.py +++ b/tests/api_resources/radar/http/ases/test_device_type.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_http_method.py b/tests/api_resources/radar/http/ases/test_http_method.py index 743ab8b7787..b045223539b 100644 --- a/tests/api_resources/radar/http/ases/test_http_method.py +++ b/tests/api_resources/radar/http/ases/test_http_method.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_http_protocol.py b/tests/api_resources/radar/http/ases/test_http_protocol.py index 728e7358ecb..b13753a4caf 100644 --- a/tests/api_resources/radar/http/ases/test_http_protocol.py +++ b/tests/api_resources/radar/http/ases/test_http_protocol.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -103,7 +103,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_ip_version.py b/tests/api_resources/radar/http/ases/test_ip_version.py index 7cc1f35beb9..3e16cb9c9e7 100644 --- a/tests/api_resources/radar/http/ases/test_ip_version.py +++ b/tests/api_resources/radar/http/ases/test_ip_version.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_os.py b/tests/api_resources/radar/http/ases/test_os.py index 6dd25123783..c0e46c14ef3 100644 --- a/tests/api_resources/radar/http/ases/test_os.py +++ b/tests/api_resources/radar/http/ases/test_os.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/ases/test_tls_version.py b/tests/api_resources/radar/http/ases/test_tls_version.py index b7afb152fa9..68e968ef510 100644 --- a/tests/api_resources/radar/http/ases/test_tls_version.py +++ b/tests/api_resources/radar/http/ases/test_tls_version.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_bot_class.py b/tests/api_resources/radar/http/locations/test_bot_class.py index 87ccd2b18c3..93040e13c86 100644 --- a/tests/api_resources/radar/http/locations/test_bot_class.py +++ b/tests/api_resources/radar/http/locations/test_bot_class.py @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -103,7 +103,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_browser_family.py b/tests/api_resources/radar/http/locations/test_browser_family.py index 7dd0326e896..b0f7066f74d 100644 --- a/tests/api_resources/radar/http/locations/test_browser_family.py +++ b/tests/api_resources/radar/http/locations/test_browser_family.py @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -103,7 +103,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_device_type.py b/tests/api_resources/radar/http/locations/test_device_type.py index fb659b5b095..3f4d5e56b40 100644 --- a/tests/api_resources/radar/http/locations/test_device_type.py +++ b/tests/api_resources/radar/http/locations/test_device_type.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_http_method.py b/tests/api_resources/radar/http/locations/test_http_method.py index dd886aa1364..267001342c1 100644 --- a/tests/api_resources/radar/http/locations/test_http_method.py +++ b/tests/api_resources/radar/http/locations/test_http_method.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_http_protocol.py b/tests/api_resources/radar/http/locations/test_http_protocol.py index def70042abf..2a6a9294a30 100644 --- a/tests/api_resources/radar/http/locations/test_http_protocol.py +++ b/tests/api_resources/radar/http/locations/test_http_protocol.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -103,7 +103,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_ip_version.py b/tests/api_resources/radar/http/locations/test_ip_version.py index 48f4a35d023..fd6c5769745 100644 --- a/tests/api_resources/radar/http/locations/test_ip_version.py +++ b/tests/api_resources/radar/http/locations/test_ip_version.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_os.py b/tests/api_resources/radar/http/locations/test_os.py index 4ca99262ff7..98253fe4e0f 100644 --- a/tests/api_resources/radar/http/locations/test_os.py +++ b/tests/api_resources/radar/http/locations/test_os.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/locations/test_tls_version.py b/tests/api_resources/radar/http/locations/test_tls_version.py index 2b16a0b8c4e..10fbe092c1e 100644 --- a/tests/api_resources/radar/http/locations/test_tls_version.py +++ b/tests/api_resources/radar/http/locations/test_tls_version.py @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/test_ases.py b/tests/api_resources/radar/http/test_ases.py index 623a65f1555..08c4f0dfda5 100644 --- a/tests/api_resources/radar/http/test_ases.py +++ b/tests/api_resources/radar/http/test_ases.py @@ -35,7 +35,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -95,7 +95,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/test_locations.py b/tests/api_resources/radar/http/test_locations.py index 92935c99387..e609c513b72 100644 --- a/tests/api_resources/radar/http/test_locations.py +++ b/tests/api_resources/radar/http/test_locations.py @@ -35,7 +35,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -95,7 +95,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/test_summary.py b/tests/api_resources/radar/http/test_summary.py index fa84618dafe..8beb2d1d8cf 100644 --- a/tests/api_resources/radar/http/test_summary.py +++ b/tests/api_resources/radar/http/test_summary.py @@ -42,7 +42,7 @@ def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -96,7 +96,7 @@ def test_method_device_type_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -149,7 +149,7 @@ def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -202,7 +202,7 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -255,7 +255,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -308,7 +308,7 @@ def test_method_os_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -361,7 +361,7 @@ def test_method_post_quantum_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -415,7 +415,7 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -471,7 +471,7 @@ async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -525,7 +525,7 @@ async def test_method_device_type_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -578,7 +578,7 @@ async def test_method_http_protocol_with_all_params(self, async_client: AsyncClo parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -631,7 +631,7 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -684,7 +684,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -737,7 +737,7 @@ async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -790,7 +790,7 @@ async def test_method_post_quantum_with_all_params(self, async_client: AsyncClou parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -844,7 +844,7 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/test_timeseries_groups.py b/tests/api_resources/radar/http/test_timeseries_groups.py index 0371f008171..443a3efbddd 100644 --- a/tests/api_resources/radar/http/test_timeseries_groups.py +++ b/tests/api_resources/radar/http/test_timeseries_groups.py @@ -45,7 +45,7 @@ def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -100,7 +100,7 @@ def test_method_browser_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -156,7 +156,7 @@ def test_method_browser_family_with_all_params(self, client: Cloudflare) -> None parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -211,7 +211,7 @@ def test_method_device_type_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -265,7 +265,7 @@ def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -319,7 +319,7 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -373,7 +373,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -427,7 +427,7 @@ def test_method_os_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -481,7 +481,7 @@ def test_method_post_quantum_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -536,7 +536,7 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -593,7 +593,7 @@ async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -648,7 +648,7 @@ async def test_method_browser_with_all_params(self, async_client: AsyncCloudflar parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -704,7 +704,7 @@ async def test_method_browser_family_with_all_params(self, async_client: AsyncCl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -759,7 +759,7 @@ async def test_method_device_type_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -813,7 +813,7 @@ async def test_method_http_protocol_with_all_params(self, async_client: AsyncClo parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -867,7 +867,7 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -921,7 +921,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -975,7 +975,7 @@ async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1029,7 +1029,7 @@ async def test_method_post_quantum_with_all_params(self, async_client: AsyncClou parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1084,7 +1084,7 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/http/test_top.py b/tests/api_resources/radar/http/test_top.py index db326ab01e8..a25ea7b57e8 100644 --- a/tests/api_resources/radar/http/test_top.py +++ b/tests/api_resources/radar/http/test_top.py @@ -38,7 +38,7 @@ def test_method_browser_families_with_all_params(self, client: Cloudflare) -> No parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -94,7 +94,7 @@ def test_method_browsers_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -154,7 +154,7 @@ async def test_method_browser_families_with_all_params(self, async_client: Async parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -210,7 +210,7 @@ async def test_method_browsers_with_all_params(self, async_client: AsyncCloudfla parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/netflows/test_top.py b/tests/api_resources/radar/netflows/test_top.py index becdf39761a..294063d1b87 100644 --- a/tests/api_resources/radar/netflows/test_top.py +++ b/tests/api_resources/radar/netflows/test_top.py @@ -33,7 +33,7 @@ def test_method_ases_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -81,7 +81,7 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -133,7 +133,7 @@ async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -181,7 +181,7 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/quality/test_iqi.py b/tests/api_resources/radar/quality/test_iqi.py index 307c2f43884..52aef8e5c8e 100644 --- a/tests/api_resources/radar/quality/test_iqi.py +++ b/tests/api_resources/radar/quality/test_iqi.py @@ -39,7 +39,7 @@ def test_method_summary_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -94,7 +94,7 @@ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> N parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -153,7 +153,7 @@ async def test_method_summary_with_all_params(self, async_client: AsyncCloudflar parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -208,7 +208,7 @@ async def test_method_timeseries_groups_with_all_params(self, async_client: Asyn parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/test_as112.py b/tests/api_resources/radar/test_as112.py index 27c2a2c1fba..fa41b93c8a8 100644 --- a/tests/api_resources/radar/test_as112.py +++ b/tests/api_resources/radar/test_as112.py @@ -34,7 +34,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -86,7 +86,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/test_bgp.py b/tests/api_resources/radar/test_bgp.py index 38030a638fc..f7feab80efb 100644 --- a/tests/api_resources/radar/test_bgp.py +++ b/tests/api_resources/radar/test_bgp.py @@ -33,7 +33,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,7 +104,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/test_connection_tampering.py b/tests/api_resources/radar/test_connection_tampering.py index 37d3f5a9195..159469316ed 100644 --- a/tests/api_resources/radar/test_connection_tampering.py +++ b/tests/api_resources/radar/test_connection_tampering.py @@ -36,7 +36,7 @@ def test_method_summary_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -84,7 +84,7 @@ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> N parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -135,7 +135,7 @@ async def test_method_summary_with_all_params(self, async_client: AsyncCloudflar parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -183,7 +183,7 @@ async def test_method_timeseries_groups_with_all_params(self, async_client: Asyn parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/test_http.py b/tests/api_resources/radar/test_http.py index 4828f727a4f..a71996ed209 100644 --- a/tests/api_resources/radar/test_http.py +++ b/tests/api_resources/radar/test_http.py @@ -34,7 +34,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -86,7 +86,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/test_netflows.py b/tests/api_resources/radar/test_netflows.py index 1446060257f..04df3a371fd 100644 --- a/tests/api_resources/radar/test_netflows.py +++ b/tests/api_resources/radar/test_netflows.py @@ -34,7 +34,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -88,7 +88,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/test_ranking.py b/tests/api_resources/radar/test_ranking.py index 61a4def2328..5cf488f26b3 100644 --- a/tests/api_resources/radar/test_ranking.py +++ b/tests/api_resources/radar/test_ranking.py @@ -34,7 +34,7 @@ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> N parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -123,7 +123,7 @@ async def test_method_timeseries_groups_with_all_params(self, async_client: Asyn parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/radar/verified_bots/test_top.py b/tests/api_resources/radar/verified_bots/test_top.py index bfb0e175fc2..d185234e31b 100644 --- a/tests/api_resources/radar/verified_bots/test_top.py +++ b/tests/api_resources/radar/verified_bots/test_top.py @@ -36,7 +36,7 @@ def test_method_bots_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -84,7 +84,7 @@ def test_method_categories_with_all_params(self, client: Cloudflare) -> None: parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -136,7 +136,7 @@ async def test_method_bots_with_all_params(self, async_client: AsyncCloudflare) parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), @@ -184,7 +184,7 @@ async def test_method_categories_with_all_params(self, async_client: AsyncCloudf parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), ], - date_range=["1d", "2d", "7d"], + date_range=["7d", "7d", "7d"], date_start=[ parse_datetime("2019-12-27T18:11:19.117Z"), parse_datetime("2019-12-27T18:11:19.117Z"), From 821bb593a9de0164e50d82333139ae710d5335ea Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 09:10:04 +0000 Subject: [PATCH 091/316] 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 989e9279123..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From d2e2b28b9866b565cd6886de51c1e1dd822a1d01 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 09:12:16 +0000 Subject: [PATCH 092/316] 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 5177d572cee..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From af263cad7303d31ac949456b5505d0c8b52f09e4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 09:21:08 +0000 Subject: [PATCH 093/316] 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 1f69c232615..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From a511f0e2cbb2a61e96f3cb589415fe80a9704434 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 10:02:45 +0000 Subject: [PATCH 094/316] 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 5177d572cee..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From c4770ee743c448a7bb8a3dabbc24f6354144d225 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 11:05:35 +0000 Subject: [PATCH 095/316] 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 989e9279123..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 258cab107d7116f1dabd7fc7d97e9074a8ab9d90 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 11:07:42 +0000 Subject: [PATCH 096/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 291e099c3e37e5db5143c3aae020326a24385de8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 11:14:06 +0000 Subject: [PATCH 097/316] 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 989e9279123..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 1273d3fcc43ab553dc5224195a446a7d9bef6c81 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 11:17:37 +0000 Subject: [PATCH 098/316] 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 c5958e1aaca..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From bc04ae8b528ec86c035981138e99ea648cfb5290 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 11:57:32 +0000 Subject: [PATCH 099/316] 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 5177d572cee..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 96735b72824d5e8e23c4806bed46dde469caa036 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:00:49 +0000 Subject: [PATCH 100/316] 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 c5958e1aaca..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From e54a57e258d36ed6b1054af8e90637c6aa66be0d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:03:00 +0000 Subject: [PATCH 101/316] 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 5177d572cee..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From bbc84f8a0376b069b8518941feca9f7fd9d94a66 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:23:46 +0000 Subject: [PATCH 102/316] 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 989e9279123..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From e8f0de59269f9b97a1b55a70cffeac08b6f8e86f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:25:55 +0000 Subject: [PATCH 103/316] 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 5177d572cee..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From f44b8d9ac90e52945dccdd5daf59db6d6fa8adc0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:28:03 +0000 Subject: [PATCH 104/316] 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 c5958e1aaca..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From 2a1cb4b5eebeeaa93b5001123a694925e76fbd87 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:40:34 +0000 Subject: [PATCH 105/316] 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 5177d572cee..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 6b898d6f100b09f5f2366aa80ef9aba6d908f916 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:42:47 +0000 Subject: [PATCH 106/316] 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 989e9279123..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 46fe427595b0c1580dfe6918782883cb8aa60007 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 13:44:52 +0000 Subject: [PATCH 107/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From c540a6bc15c3853b7c24cf7ab0b76442ccdbe2b5 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 14:09:51 +0000 Subject: [PATCH 108/316] 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 989e9279123..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From a1855ad6ee34f84f89450f911184b6f7eed4413d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 14:12:01 +0000 Subject: [PATCH 109/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 1de091bc1ba4baf0e2bea21d0f2222a89c4edf69 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 14:16:06 +0000 Subject: [PATCH 110/316] 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 989e9279123..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From 24610ee1243535917235fe9ba04c3e80580c1c1c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 14:18:16 +0000 Subject: [PATCH 111/316] 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 1f69c232615..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 52fcb9bf6988bd59bed933efd942ac8a35825fb9 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 14:40:28 +0000 Subject: [PATCH 112/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 878b526a9d376b2a3fceaefc7223388436f8c31c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 15:16:54 +0000 Subject: [PATCH 113/316] 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 989e9279123..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From 98d6d681f0ad9668ce3fdedd534fbf1ba8f8507d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 16:07:55 +0000 Subject: [PATCH 114/316] 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 1f69c232615..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 99bcb73398dfc64dfa6f5983de458835156e2b92 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 16:10:17 +0000 Subject: [PATCH 115/316] 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 c5958e1aaca..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From 3f6b0175cfdcdc991232c1a42361ef7d2873a7d4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 19:31:38 +0000 Subject: [PATCH 116/316] 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 1f69c232615..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 85ea74c4a37b5194290c8209516a362b59750cb4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 19:34:02 +0000 Subject: [PATCH 117/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From b8641babb0bdfe6fe7a95a9e483dfd92c44ec77f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 4 Jul 2024 21:45:13 +0000 Subject: [PATCH 118/316] 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 989e9279123..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From 541710005f476704c47c3521d248003fc9779029 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 06:29:03 +0000 Subject: [PATCH 119/316] 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 1f69c232615..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From 811809ea7819adb8ac0d7193d8381804b7414780 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 09:22:40 +0000 Subject: [PATCH 120/316] 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 5177d572cee..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From ca8df49cac11b03f631243f2b5bc61033260d72b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 13:38:28 +0000 Subject: [PATCH 121/316] 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 1f69c232615..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From 6599b894084c7049ad8bd2990c32e5ba6064d896 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 13:50:33 +0000 Subject: [PATCH 122/316] 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 5177d572cee..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From 2adff4fa8c4a1d2d16f79b4942344cdf0bb14365 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 13:52:41 +0000 Subject: [PATCH 123/316] 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 1f69c232615..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From 64746987f3b1d510fdb01d0224a06d22c90de7fb Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 14:08:50 +0000 Subject: [PATCH 124/316] 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 5177d572cee..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 22b306f9f32baeb01fc591bab5e7eb055b8f7866 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 14:11:00 +0000 Subject: [PATCH 125/316] 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 989e9279123..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From b3aea3b33e283f9bfc69f15f583d3ca91f9c1c16 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 14:19:50 +0000 Subject: [PATCH 126/316] 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 c5958e1aaca..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From b4ccd6ae626bd333ba9a29476c54f2c49f5871c8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 15:29:02 +0000 Subject: [PATCH 127/316] 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 5177d572cee..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From d086f8e4065dedb7117027d5d1dab45b08d8b83f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 15:31:39 +0000 Subject: [PATCH 128/316] 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 989e9279123..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 87285467021bc607827c284359a09900592417ec Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 16:11:14 +0000 Subject: [PATCH 129/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 0648b00bc8893394882a6198a86f2775aeffa265 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 16:28:02 +0000 Subject: [PATCH 130/316] 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 989e9279123..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From 209d91db43837a3bc759fa6ba0f6ad03e7bd1c22 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 17:47:00 +0000 Subject: [PATCH 131/316] 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 5177d572cee..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From be954f1f8df7965f71180d994464286455dff31e Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 17:49:11 +0000 Subject: [PATCH 132/316] 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 1f69c232615..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From 2ebf3aedd935784cbd7463980ce8b19400136d14 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 18:11:38 +0000 Subject: [PATCH 133/316] 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 5177d572cee..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From 9e8d867e3e9c4043366b0934900b96d63aedd83a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 18:13:45 +0000 Subject: [PATCH 134/316] 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 1f69c232615..5177d572cee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml From cf5b13e5271c63012a21520dc168ed64a1696225 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 19:05:20 +0000 Subject: [PATCH 135/316] 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 5177d572cee..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77a42153cdc8b00b5807776bb9d2cd0eb71ffa2200827db63d297e88942d6eff.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 398428cde69f0953309c5142d56949cc55b5f3a1 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 20:32:02 +0000 Subject: [PATCH 136/316] 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 c5958e1aaca..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From f3d27bd774f90ae72b41547f7db2487ada600973 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 5 Jul 2024 20:34:13 +0000 Subject: [PATCH 137/316] 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 1f69c232615..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From c4ec2518e7031bc83aa21508f647f104424da4ce Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Sat, 6 Jul 2024 02:26:41 +0000 Subject: [PATCH 138/316] 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 c5958e1aaca..1f69c232615 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml From f621e070f2e3ad28b0770aebd595ff65ad445089 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Sat, 6 Jul 2024 02:28:53 +0000 Subject: [PATCH 139/316] 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 1f69c232615..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faf5f274eebbe99323e505d499ea03feff2d35fe221caeb2a184a9b006985bac.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From e7ece7099ae716de17b421d5b9905fe52b19dc80 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 01:11:54 +0000 Subject: [PATCH 140/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 33393052922c358ff090b879c254539d6479f9b7 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 01:14:05 +0000 Subject: [PATCH 141/316] 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 989e9279123..c5958e1aaca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml From 32a6d2dcd9e3381c3d3e0c345e377f82a46f5352 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 08:39:40 +0000 Subject: [PATCH 142/316] 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 c5958e1aaca..989e9279123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15d355243729cd5d6e49e5f7877ed4a1b36b20889143b7bf9773f3d7b91f8934.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml From 4f48f341129c396bdc50dafe7bc6781f6b077877 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 09:08:51 +0000 Subject: [PATCH 143/316] 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 989e9279123..353a4a6c42b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57d5393f478118c0b972617567a66d66ffd64916fddd3f2328cd012671a12860.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml From 8b94b8dd763f1c4688ad27e6a36c138e6cf27052 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 11:55:34 +0000 Subject: [PATCH 144/316] 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 353a4a6c42b..24c353f363b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dd4ca112610604ad18207b423f9aa57224fdb65a0c6d126f50cbe4d151f1424.yml From ff6a8754280633d21d15f55861adc4cea3d8708c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 11:57:42 +0000 Subject: [PATCH 145/316] 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 24c353f363b..353a4a6c42b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dd4ca112610604ad18207b423f9aa57224fdb65a0c6d126f50cbe4d151f1424.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml From c32f16418b56b29a1a21896930423b0a9de31e89 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 12:29:49 +0000 Subject: [PATCH 146/316] 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 353a4a6c42b..24c353f363b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dd4ca112610604ad18207b423f9aa57224fdb65a0c6d126f50cbe4d151f1424.yml From bfd6950cfc776a23d60f7bca40667b41bf235e2b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 12:31:56 +0000 Subject: [PATCH 147/316] 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 24c353f363b..353a4a6c42b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dd4ca112610604ad18207b423f9aa57224fdb65a0c6d126f50cbe4d151f1424.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml From b4e9e71ad85e18a3aacdcd1afdfa481ce63fad20 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 13:10:14 +0000 Subject: [PATCH 148/316] 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 353a4a6c42b..ccc4badb569 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08f0f45eb85f280f023133f26e7ba2178be0978937169a4dd4a61eb21ae27d30.yml From 6e6f0e325b4234ff4b84f86f6a2af2c9a7727b31 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 13:12:39 +0000 Subject: [PATCH 149/316] 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 ccc4badb569..353a4a6c42b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08f0f45eb85f280f023133f26e7ba2178be0978937169a4dd4a61eb21ae27d30.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml From 8176af1d6cde5c1cde27a48f135cdd3d91f955d2 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 13:55:47 +0000 Subject: [PATCH 150/316] 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 353a4a6c42b..ccc4badb569 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08f0f45eb85f280f023133f26e7ba2178be0978937169a4dd4a61eb21ae27d30.yml From 688c4f037826f4300d8be2c7a770daa33bfdd2f4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 14:47:11 +0000 Subject: [PATCH 151/316] 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 ccc4badb569..24c353f363b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08f0f45eb85f280f023133f26e7ba2178be0978937169a4dd4a61eb21ae27d30.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dd4ca112610604ad18207b423f9aa57224fdb65a0c6d126f50cbe4d151f1424.yml From 18655278398f9763c94a71cdfe9313bc6b0a5abc Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 15:14:04 +0000 Subject: [PATCH 152/316] 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 24c353f363b..353a4a6c42b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dd4ca112610604ad18207b423f9aa57224fdb65a0c6d126f50cbe4d151f1424.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml From 9de375beef2488972cacd318bfd27a49f3973e02 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 16:27:20 +0000 Subject: [PATCH 153/316] 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 353a4a6c42b..b35e2227e58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea8de156e9e4983c7ef2529ace577231fa6277a6d0247f56a8253b3e832a1ad1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml From d5bb6f83628aabfcd1db493fcc6eb76e22de5f68 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 16:35:29 +0000 Subject: [PATCH 154/316] 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 b35e2227e58..358550dbb4f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-053a98f22620ebe455d4d0e41859a558e38e2fc1d7ad212f2b1b73ac6953d53c.yml From aaa21da3219f12a4be884547b5ab81a2fd1bfbac Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 16:37:43 +0000 Subject: [PATCH 155/316] 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 358550dbb4f..b35e2227e58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-053a98f22620ebe455d4d0e41859a558e38e2fc1d7ad212f2b1b73ac6953d53c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml From e3a3b6208066f7b58700c4007300a92d337e744d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 16:39:52 +0000 Subject: [PATCH 156/316] 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 b35e2227e58..358550dbb4f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-053a98f22620ebe455d4d0e41859a558e38e2fc1d7ad212f2b1b73ac6953d53c.yml From 6a16a5856041fc52cad561b36c6757a5fb229b60 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 16:42:19 +0000 Subject: [PATCH 157/316] 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 358550dbb4f..b35e2227e58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-053a98f22620ebe455d4d0e41859a558e38e2fc1d7ad212f2b1b73ac6953d53c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml From dced7fcf3365bff044541ba43d2d1909f3093483 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 16:44:30 +0000 Subject: [PATCH 158/316] 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 b35e2227e58..b2747888479 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c5b09b862632d3f88d87f241eb2fee59c14b23b8a4a9484d9cf8d95589f1b029.yml From 491a77520bc9c998b2ebf235fcef1d493259bfbd Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 16:54:19 +0000 Subject: [PATCH 159/316] 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 b2747888479..4427a40c0eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c5b09b862632d3f88d87f241eb2fee59c14b23b8a4a9484d9cf8d95589f1b029.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4602f096e5a3d124657e5ffbdb1ef869da3c3b3d71cccf378b6dab1017e167ef.yml From f4d0dc713833de606438f5b991c5217919c8858c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 17:12:52 +0000 Subject: [PATCH 160/316] 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 4427a40c0eb..b35e2227e58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4602f096e5a3d124657e5ffbdb1ef869da3c3b3d71cccf378b6dab1017e167ef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml From b8411a93631256d3e60260fb1d085b5a2fc61059 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 17:49:40 +0000 Subject: [PATCH 161/316] 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 b35e2227e58..c2ed7d96d67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d41100d9a1ca3dfd7587a2211754d6255a4822d960a8db09658665e5fec9ee59.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml From bb2a07e35bb62f7778af00a539c45b100250b9ab Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 18:29:05 +0000 Subject: [PATCH 162/316] 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 c2ed7d96d67..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From 4a1eec886c9d1117dda13769dc34450101aaef79 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 18:58:47 +0000 Subject: [PATCH 163/316] 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 68dd0829206..e46d51b19b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml From da7d67586ad2cc617d3f2e67f0e68e6669571330 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 19:00:59 +0000 Subject: [PATCH 164/316] 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 e46d51b19b1..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From f81ecdddbe0e69bc001dde77b5766a6d84ec337a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 19:12:30 +0000 Subject: [PATCH 165/316] 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 68dd0829206..e46d51b19b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml From 8116c69364aefac196fc53103868d3830dc3ee74 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 8 Jul 2024 19:14:40 +0000 Subject: [PATCH 166/316] 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 e46d51b19b1..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From 03547804fcf6ef2ec07093dbcadf81be21db528e Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 08:01:41 +0000 Subject: [PATCH 167/316] 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 68dd0829206..64843fee3d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6fe6af3e26000735415ccc406af46eac8219e5933935bf41fbfddf9b98698a6e.yml From bb11a58e22404b7901bf03be2c0abeb78d15ddd3 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 08:55:09 +0000 Subject: [PATCH 168/316] 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 64843fee3d8..e46d51b19b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6fe6af3e26000735415ccc406af46eac8219e5933935bf41fbfddf9b98698a6e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml From 65df83ba6d8e81fb1c8285548952ec522a76fbfb Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 09:56:08 +0000 Subject: [PATCH 169/316] 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 e46d51b19b1..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From 647cd3ebbcb92abd2bd19a3c845d9ad3f1da86b2 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 10:08:19 +0000 Subject: [PATCH 170/316] 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 68dd0829206..c2ed7d96d67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml From 15ef09d211715e102a7230463291f842c86c455d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 10:10:31 +0000 Subject: [PATCH 171/316] 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 c2ed7d96d67..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From 15ad9355e6cb8a6171954a4c3660dc45bbde134d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 10:24:24 +0000 Subject: [PATCH 172/316] 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 68dd0829206..c2ed7d96d67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml From ed595005439f2820450795575b37f5a9fafaf1ae Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 10:26:36 +0000 Subject: [PATCH 173/316] 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 c2ed7d96d67..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From a138322698b7398a94541bf47ef931088a54a63c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 11:36:02 +0000 Subject: [PATCH 174/316] 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 68dd0829206..c2ed7d96d67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml From 070918f0d2abab1766b0d0a0b12cc3a2f738922f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 11:46:34 +0000 Subject: [PATCH 175/316] 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 c2ed7d96d67..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From b39b42a37f4e218c0c5b82cb99ef848e77d50972 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 13:06:50 +0000 Subject: [PATCH 176/316] 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 68dd0829206..64843fee3d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6fe6af3e26000735415ccc406af46eac8219e5933935bf41fbfddf9b98698a6e.yml From 114bb6b322e7fdd0481be424dea91fa9f13c1221 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 14:08:31 +0000 Subject: [PATCH 177/316] 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 64843fee3d8..c2ed7d96d67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6fe6af3e26000735415ccc406af46eac8219e5933935bf41fbfddf9b98698a6e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml From a9193f3efd37c3ba952f5fc1bd9716109a2f6038 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 15:24:28 +0000 Subject: [PATCH 178/316] 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 c2ed7d96d67..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From bcbde3c48acc8d07268bb51550b67273bad1b526 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:05:30 +0000 Subject: [PATCH 179/316] feat(api): OpenAPI spec update via Stainless API (#1170) --- .stats.yml | 2 +- src/cloudflare/_base_client.py | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 68dd0829206..e46d51b19b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index 01020ef601c..261565626bf 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -955,6 +955,11 @@ def _request( stream: bool, stream_cls: type[_StreamT] | None, ) -> ResponseT | _StreamT: + # create a copy of the options we were given so that if the + # options are mutated later & we then retry, the retries are + # given the original options + input_options = model_copy(options) + cast_to = self._maybe_override_cast_to(cast_to, options) self._prepare_options(options) @@ -979,7 +984,7 @@ def _request( if retries > 0: return self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -994,7 +999,7 @@ def _request( if retries > 0: return self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -1022,7 +1027,7 @@ def _request( if retries > 0 and self._should_retry(err.response): err.response.close() return self._retry_request( - options, + input_options, cast_to, retries, err.response.headers, @@ -1518,6 +1523,11 @@ async def _request( # execute it earlier while we are in an async context self._platform = await asyncify(get_platform)() + # create a copy of the options we were given so that if the + # options are mutated later & we then retry, the retries are + # given the original options + input_options = model_copy(options) + cast_to = self._maybe_override_cast_to(cast_to, options) await self._prepare_options(options) @@ -1540,7 +1550,7 @@ async def _request( if retries > 0: return await self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -1555,7 +1565,7 @@ async def _request( if retries > 0: return await self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -1578,7 +1588,7 @@ async def _request( if retries > 0 and self._should_retry(err.response): await err.response.aclose() return await self._retry_request( - options, + input_options, cast_to, retries, err.response.headers, From 8d53838110ffb81f9df3a9ff2c077bf40bce3803 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 16:07:39 +0000 Subject: [PATCH 180/316] 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 e46d51b19b1..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-705f4e474ef9306d04d07ae04f559a20a888bdb98813ec16734a072080874e74.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From b4c773eca520228865aff15b602889f233db07a3 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 16:09:51 +0000 Subject: [PATCH 181/316] 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 68dd0829206..c2ed7d96d67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml From b37a4a952c5d474c52d80c86e95232c843c8c4ff Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 16:35:46 +0000 Subject: [PATCH 182/316] 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 c2ed7d96d67..64843fee3d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6fe6af3e26000735415ccc406af46eac8219e5933935bf41fbfddf9b98698a6e.yml From e14765ee80efb3ba48a30152cc11e7ea05957995 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 17:04:59 +0000 Subject: [PATCH 183/316] 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 64843fee3d8..c2ed7d96d67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6fe6af3e26000735415ccc406af46eac8219e5933935bf41fbfddf9b98698a6e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml From ef6f32cf5d3936c61de034445acb08661f2ffdfa Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 17:07:11 +0000 Subject: [PATCH 184/316] 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 c2ed7d96d67..68dd0829206 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b916dcb9a2b65f9c166e862d9ad4dd38fd7304eeb43d66c23219deebe6b44fca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml From d56dc7a474b8e2ae1d475bbfecb84d0f613afdd4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 17:11:30 +0000 Subject: [PATCH 185/316] 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 68dd0829206..40219cd31be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4709b7dee8b6c80c4c2f928152e248b95ba884602bcaed42c646d0e982cafc6a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml From 82449b15512f4926d4c125fdfeaf48829cf0ba3f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 17:22:03 +0000 Subject: [PATCH 186/316] 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 40219cd31be..9c81953ffeb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml From 81164f1641408ec586c6f93b01b72702a4288f11 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 18:15:43 +0000 Subject: [PATCH 187/316] 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 9c81953ffeb..4f1b280ae23 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00b3d07f107e145af10fd20d6c86f4548a73899009a2896b482d68511ffc401b.yml From 0575db6f08ac4c85283eedd75d1038e09e084e59 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 18:17:54 +0000 Subject: [PATCH 188/316] 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 4f1b280ae23..9c81953ffeb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00b3d07f107e145af10fd20d6c86f4548a73899009a2896b482d68511ffc401b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml From 9bc3a4555aabcf97d43435d75f355de45e96e168 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 18:43:49 +0000 Subject: [PATCH 189/316] 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 9c81953ffeb..4f1b280ae23 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00b3d07f107e145af10fd20d6c86f4548a73899009a2896b482d68511ffc401b.yml From 582594017ebd9426b7d7c64e258bff1835ead53c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 18:46:03 +0000 Subject: [PATCH 190/316] 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 4f1b280ae23..40219cd31be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00b3d07f107e145af10fd20d6c86f4548a73899009a2896b482d68511ffc401b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml From 2bad5b93a901a1ee89b35891e05d7bbf05d1589e Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 19:35:40 +0000 Subject: [PATCH 191/316] 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 40219cd31be..4f1b280ae23 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00b3d07f107e145af10fd20d6c86f4548a73899009a2896b482d68511ffc401b.yml From f4ca9d12410b0fba30b69bbbba811ba60b9967e7 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 19:45:02 +0000 Subject: [PATCH 192/316] 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 4f1b280ae23..9c81953ffeb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00b3d07f107e145af10fd20d6c86f4548a73899009a2896b482d68511ffc401b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml From a72ac5b5a6fbbdb1a2345f6199a68755fa1f87fc Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 20:40:37 +0000 Subject: [PATCH 193/316] 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 9c81953ffeb..40219cd31be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml From 61f20128d4257abc0216c14cc39781116addeaac Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 20:55:54 +0000 Subject: [PATCH 194/316] 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 40219cd31be..9c81953ffeb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml From 2c0ff7dee26669a155639a3cc9b68de1e6592ddb Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 21:27:31 +0000 Subject: [PATCH 195/316] 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 9c81953ffeb..40219cd31be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml From 0c67313053090532785b8df4be37150d586ef25e Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 22:41:23 +0000 Subject: [PATCH 196/316] 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 40219cd31be..9c81953ffeb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml From cd05b30c88c7c4950159a0d1c35ea41787e89b8b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 22:55:55 +0000 Subject: [PATCH 197/316] 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 9c81953ffeb..40219cd31be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0040324c831ec6c0bd57dd7c7a695a5d94b0dcbcbd86534ef29450619d14fa80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml From da4b88885af11c8cdaa24f6df47f62474af6472b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 23:09:06 +0000 Subject: [PATCH 198/316] 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 40219cd31be..d5feb3a1b5f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14edb011f329e0b47ce2b207acc1a5b84a48c3eace9ea30600bb4d5d745eaef.yml From 284257253d7f203f4483c1a4e555879e92c77751 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 9 Jul 2024 23:14:13 +0000 Subject: [PATCH 199/316] 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 d5feb3a1b5f..40219cd31be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14edb011f329e0b47ce2b207acc1a5b84a48c3eace9ea30600bb4d5d745eaef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml From 915c1d761dde3485d3aca5f4b3ddb530a15a25ee Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 08:03:16 +0000 Subject: [PATCH 200/316] 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 40219cd31be..d5feb3a1b5f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4ca6bb063e3bd0cc5eaa7b6bd9174e37c13c77658d465405f59aefdde0f6f8a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14edb011f329e0b47ce2b207acc1a5b84a48c3eace9ea30600bb4d5d745eaef.yml From 49a344776c7654fd3448b241d886b359899820be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 08:36:14 +0000 Subject: [PATCH 201/316] feat(api): OpenAPI spec update via Stainless API (#1171) --- .stats.yml | 2 +- api.md | 10 +-- .../attack_surface_report/issue_types.py | 14 ++-- .../intel/attack_surface_report/issues.py | 50 +++++++------- .../issue_list_response.py | 4 +- .../attack_surface_report/test_issue_types.py | 14 ++-- .../attack_surface_report/test_issues.py | 66 +++++++++---------- 7 files changed, 80 insertions(+), 80 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5feb3a1b5f..b399723081a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14edb011f329e0b47ce2b207acc1a5b84a48c3eace9ea30600bb4d5d745eaef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c06ed89df76febdc32fc835c9d37220c0400821d24f9707c3484054e78e1d94e.yml diff --git a/api.md b/api.md index a2e72a6a5dd..5fd9ada828f 100644 --- a/api.md +++ b/api.md @@ -3328,7 +3328,7 @@ from cloudflare.types.intel.attack_surface_report import IssueTypeGetResponse Methods: -- client.intel.attack_surface_report.issue_types.get(\*, account_id) -> IssueTypeGetResponse +- client.intel.attack_surface_report.issue_types.get(\*, account_id) -> Optional ### Issues @@ -3349,10 +3349,10 @@ from cloudflare.types.intel.attack_surface_report import ( Methods: - client.intel.attack_surface_report.issues.list(\*, account_id, \*\*params) -> SyncV4PagePagination[IssueListResponse] -- client.intel.attack*surface_report.issues.class*(\*, account_id, \*\*params) -> IssueClassResponse -- client.intel.attack_surface_report.issues.dismiss(issue_id, \*, account_id, \*\*params) -> IssueDismissResponse -- client.intel.attack_surface_report.issues.severity(\*, account_id, \*\*params) -> IssueSeverityResponse -- client.intel.attack_surface_report.issues.type(\*, account_id, \*\*params) -> IssueTypeResponse +- client.intel.attack*surface_report.issues.class*(\*, account_id, \*\*params) -> Optional +- client.intel.attack_surface_report.issues.dismiss(issue_id, \*, account_id, \*\*params) -> Optional +- client.intel.attack_surface_report.issues.severity(\*, account_id, \*\*params) -> Optional +- client.intel.attack_surface_report.issues.type(\*, account_id, \*\*params) -> Optional # MagicTransit diff --git a/src/cloudflare/resources/intel/attack_surface_report/issue_types.py b/src/cloudflare/resources/intel/attack_surface_report/issue_types.py index 327ad759c0c..1ddbe050a27 100644 --- a/src/cloudflare/resources/intel/attack_surface_report/issue_types.py +++ b/src/cloudflare/resources/intel/attack_surface_report/issue_types.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -43,7 +43,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueTypeGetResponse: + ) -> Optional[IssueTypeGetResponse]: """ Get Security Center Issues Types @@ -67,9 +67,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IssueTypeGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueTypeGetResponse]]._unwrapper, ), - cast_to=cast(Type[IssueTypeGetResponse], ResultWrapper[IssueTypeGetResponse]), + cast_to=cast(Type[Optional[IssueTypeGetResponse]], ResultWrapper[IssueTypeGetResponse]), ) @@ -92,7 +92,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueTypeGetResponse: + ) -> Optional[IssueTypeGetResponse]: """ Get Security Center Issues Types @@ -116,9 +116,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IssueTypeGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueTypeGetResponse]]._unwrapper, ), - cast_to=cast(Type[IssueTypeGetResponse], ResultWrapper[IssueTypeGetResponse]), + cast_to=cast(Type[Optional[IssueTypeGetResponse]], ResultWrapper[IssueTypeGetResponse]), ) diff --git a/src/cloudflare/resources/intel/attack_surface_report/issues.py b/src/cloudflare/resources/intel/attack_surface_report/issues.py index d4f6cca2c9f..9eb4457b40e 100644 --- a/src/cloudflare/resources/intel/attack_surface_report/issues.py +++ b/src/cloudflare/resources/intel/attack_surface_report/issues.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, cast +from typing import Any, List, Type, Optional, cast import httpx @@ -147,7 +147,7 @@ def class_( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueClassResponse: + ) -> Optional[IssueClassResponse]: """ Get Security Center Issue Counts by Class @@ -187,9 +187,9 @@ def class_( }, issue_class_params.IssueClassParams, ), - post_parser=ResultWrapper[IssueClassResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueClassResponse]]._unwrapper, ), - cast_to=cast(Type[IssueClassResponse], ResultWrapper[IssueClassResponse]), + cast_to=cast(Type[Optional[IssueClassResponse]], ResultWrapper[IssueClassResponse]), ) def dismiss( @@ -204,7 +204,7 @@ def dismiss( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueDismissResponse: + ) -> Optional[IssueDismissResponse]: """ Archive Security Center Insight @@ -224,7 +224,7 @@ def dismiss( if not issue_id: raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}") return cast( - IssueDismissResponse, + Optional[IssueDismissResponse], self._put( f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss", body=maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams), @@ -233,7 +233,7 @@ def dismiss( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IssueDismissResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueDismissResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[IssueDismissResponse] @@ -262,7 +262,7 @@ def severity( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueSeverityResponse: + ) -> Optional[IssueSeverityResponse]: """ Get Security Center Issue Counts by Severity @@ -302,9 +302,9 @@ def severity( }, issue_severity_params.IssueSeverityParams, ), - post_parser=ResultWrapper[IssueSeverityResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueSeverityResponse]]._unwrapper, ), - cast_to=cast(Type[IssueSeverityResponse], ResultWrapper[IssueSeverityResponse]), + cast_to=cast(Type[Optional[IssueSeverityResponse]], ResultWrapper[IssueSeverityResponse]), ) def type( @@ -328,7 +328,7 @@ def type( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueTypeResponse: + ) -> Optional[IssueTypeResponse]: """ Get Security Center Issue Counts by Type @@ -368,9 +368,9 @@ def type( }, issue_type_params.IssueTypeParams, ), - post_parser=ResultWrapper[IssueTypeResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueTypeResponse]]._unwrapper, ), - cast_to=cast(Type[IssueTypeResponse], ResultWrapper[IssueTypeResponse]), + cast_to=cast(Type[Optional[IssueTypeResponse]], ResultWrapper[IssueTypeResponse]), ) @@ -478,7 +478,7 @@ async def class_( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueClassResponse: + ) -> Optional[IssueClassResponse]: """ Get Security Center Issue Counts by Class @@ -518,9 +518,9 @@ async def class_( }, issue_class_params.IssueClassParams, ), - post_parser=ResultWrapper[IssueClassResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueClassResponse]]._unwrapper, ), - cast_to=cast(Type[IssueClassResponse], ResultWrapper[IssueClassResponse]), + cast_to=cast(Type[Optional[IssueClassResponse]], ResultWrapper[IssueClassResponse]), ) async def dismiss( @@ -535,7 +535,7 @@ async def dismiss( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueDismissResponse: + ) -> Optional[IssueDismissResponse]: """ Archive Security Center Insight @@ -555,7 +555,7 @@ async def dismiss( if not issue_id: raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}") return cast( - IssueDismissResponse, + Optional[IssueDismissResponse], await self._put( f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss", body=await async_maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams), @@ -564,7 +564,7 @@ async def dismiss( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IssueDismissResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueDismissResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[IssueDismissResponse] @@ -593,7 +593,7 @@ async def severity( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueSeverityResponse: + ) -> Optional[IssueSeverityResponse]: """ Get Security Center Issue Counts by Severity @@ -633,9 +633,9 @@ async def severity( }, issue_severity_params.IssueSeverityParams, ), - post_parser=ResultWrapper[IssueSeverityResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueSeverityResponse]]._unwrapper, ), - cast_to=cast(Type[IssueSeverityResponse], ResultWrapper[IssueSeverityResponse]), + cast_to=cast(Type[Optional[IssueSeverityResponse]], ResultWrapper[IssueSeverityResponse]), ) async def type( @@ -659,7 +659,7 @@ async def type( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IssueTypeResponse: + ) -> Optional[IssueTypeResponse]: """ Get Security Center Issue Counts by Type @@ -699,9 +699,9 @@ async def type( }, issue_type_params.IssueTypeParams, ), - post_parser=ResultWrapper[IssueTypeResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IssueTypeResponse]]._unwrapper, ), - cast_to=cast(Type[IssueTypeResponse], ResultWrapper[IssueTypeResponse]), + cast_to=cast(Type[Optional[IssueTypeResponse]], ResultWrapper[IssueTypeResponse]), ) diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py b/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py index 4d96fa65072..dfdd7cf43f4 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py @@ -53,7 +53,7 @@ class IssueListResponse(BaseModel): messages: List[ResponseInfo] - result: Result - success: Literal[True] """Whether the API call was successful""" + + result: Optional[Result] = None diff --git a/tests/api_resources/intel/attack_surface_report/test_issue_types.py b/tests/api_resources/intel/attack_surface_report/test_issue_types.py index 904b3db245f..25b244d8989 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issue_types.py +++ b/tests/api_resources/intel/attack_surface_report/test_issue_types.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest @@ -22,7 +22,7 @@ def test_method_get(self, client: Cloudflare) -> None: issue_type = client.intel.attack_surface_report.issue_types.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) + assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: @@ -33,7 +33,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue_type = response.parse() - assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) + assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: @@ -44,7 +44,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue_type = response.parse() - assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) + assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"]) assert cast(Any, response.is_closed) is True @@ -64,7 +64,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: issue_type = await async_client.intel.attack_surface_report.issue_types.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) + assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @@ -75,7 +75,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue_type = await response.parse() - assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) + assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: @@ -86,7 +86,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue_type = await response.parse() - assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) + assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py index 7f46dae5dca..c1e5f300928 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issues.py +++ b/tests/api_resources/intel/attack_surface_report/test_issues.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest @@ -87,7 +87,7 @@ def test_method_class(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.class_( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) @parametrize def test_method_class_with_all_params(self, client: Cloudflare) -> None: @@ -105,7 +105,7 @@ def test_method_class_with_all_params(self, client: Cloudflare) -> None: subject=["example.com", "example.com", "example.com"], subject_neq=["example.com", "example.com", "example.com"], ) - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) @parametrize def test_raw_response_class(self, client: Cloudflare) -> None: @@ -116,7 +116,7 @@ def test_raw_response_class(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) @parametrize def test_streaming_response_class(self, client: Cloudflare) -> None: @@ -127,7 +127,7 @@ def test_streaming_response_class(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -144,7 +144,7 @@ def test_method_dismiss(self, client: Cloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @parametrize def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: @@ -153,7 +153,7 @@ def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", dismiss=True, ) - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @parametrize def test_raw_response_dismiss(self, client: Cloudflare) -> None: @@ -165,7 +165,7 @@ def test_raw_response_dismiss(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @parametrize def test_streaming_response_dismiss(self, client: Cloudflare) -> None: @@ -177,7 +177,7 @@ def test_streaming_response_dismiss(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -200,7 +200,7 @@ def test_method_severity(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.severity( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) @parametrize def test_method_severity_with_all_params(self, client: Cloudflare) -> None: @@ -218,7 +218,7 @@ def test_method_severity_with_all_params(self, client: Cloudflare) -> None: subject=["example.com", "example.com", "example.com"], subject_neq=["example.com", "example.com", "example.com"], ) - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) @parametrize def test_raw_response_severity(self, client: Cloudflare) -> None: @@ -229,7 +229,7 @@ def test_raw_response_severity(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) @parametrize def test_streaming_response_severity(self, client: Cloudflare) -> None: @@ -240,7 +240,7 @@ def test_streaming_response_severity(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -256,7 +256,7 @@ def test_method_type(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.type( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) @parametrize def test_method_type_with_all_params(self, client: Cloudflare) -> None: @@ -274,7 +274,7 @@ def test_method_type_with_all_params(self, client: Cloudflare) -> None: subject=["example.com", "example.com", "example.com"], subject_neq=["example.com", "example.com", "example.com"], ) - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) @parametrize def test_raw_response_type(self, client: Cloudflare) -> None: @@ -285,7 +285,7 @@ def test_raw_response_type(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) @parametrize def test_streaming_response_type(self, client: Cloudflare) -> None: @@ -296,7 +296,7 @@ def test_streaming_response_type(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = response.parse() - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -374,7 +374,7 @@ async def test_method_class(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.class_( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) @parametrize async def test_method_class_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -392,7 +392,7 @@ async def test_method_class_with_all_params(self, async_client: AsyncCloudflare) subject=["example.com", "example.com", "example.com"], subject_neq=["example.com", "example.com", "example.com"], ) - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) @parametrize async def test_raw_response_class(self, async_client: AsyncCloudflare) -> None: @@ -403,7 +403,7 @@ async def test_raw_response_class(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) @parametrize async def test_streaming_response_class(self, async_client: AsyncCloudflare) -> None: @@ -414,7 +414,7 @@ async def test_streaming_response_class(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueClassResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueClassResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -431,7 +431,7 @@ async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @parametrize async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -440,7 +440,7 @@ async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflar account_id="023e105f4ecef8ad9ca31a8372d0c353", dismiss=True, ) - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @parametrize async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None: @@ -452,7 +452,7 @@ async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @parametrize async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -> None: @@ -464,7 +464,7 @@ async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) - assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueDismissResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -487,7 +487,7 @@ async def test_method_severity(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.severity( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) @parametrize async def test_method_severity_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -505,7 +505,7 @@ async def test_method_severity_with_all_params(self, async_client: AsyncCloudfla subject=["example.com", "example.com", "example.com"], subject_neq=["example.com", "example.com", "example.com"], ) - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) @parametrize async def test_raw_response_severity(self, async_client: AsyncCloudflare) -> None: @@ -516,7 +516,7 @@ async def test_raw_response_severity(self, async_client: AsyncCloudflare) -> Non assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) @parametrize async def test_streaming_response_severity(self, async_client: AsyncCloudflare) -> None: @@ -527,7 +527,7 @@ async def test_streaming_response_severity(self, async_client: AsyncCloudflare) assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueSeverityResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -543,7 +543,7 @@ async def test_method_type(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.type( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) @parametrize async def test_method_type_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -561,7 +561,7 @@ async def test_method_type_with_all_params(self, async_client: AsyncCloudflare) subject=["example.com", "example.com", "example.com"], subject_neq=["example.com", "example.com", "example.com"], ) - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) @parametrize async def test_raw_response_type(self, async_client: AsyncCloudflare) -> None: @@ -572,7 +572,7 @@ async def test_raw_response_type(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) @parametrize async def test_streaming_response_type(self, async_client: AsyncCloudflare) -> None: @@ -583,7 +583,7 @@ async def test_streaming_response_type(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" issue = await response.parse() - assert_matches_type(IssueTypeResponse, issue, path=["response"]) + assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"]) assert cast(Any, response.is_closed) is True From d8f38c68efbc4b1cf8b9f80e81f32adf971ab56b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 09:35:58 +0000 Subject: [PATCH 202/316] 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 b399723081a..f22c56405ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c06ed89df76febdc32fc835c9d37220c0400821d24f9707c3484054e78e1d94e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml From c723bde8ca43b8c64a78700ffafd208d12ac5967 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 09:38:14 +0000 Subject: [PATCH 203/316] 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 f22c56405ff..b399723081a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c06ed89df76febdc32fc835c9d37220c0400821d24f9707c3484054e78e1d94e.yml From 15aabc46d6cdce0e93ef9a52ed8acb644a1a21b4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 10:27:23 +0000 Subject: [PATCH 204/316] 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 b399723081a..f22c56405ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c06ed89df76febdc32fc835c9d37220c0400821d24f9707c3484054e78e1d94e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml From ec24a52f7f0dc3f0eea7ae905dcffa0aada85366 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 10:29:32 +0000 Subject: [PATCH 205/316] 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 f22c56405ff..b399723081a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c06ed89df76febdc32fc835c9d37220c0400821d24f9707c3484054e78e1d94e.yml From 06a3d17164bbb3bbde5f6c34fe50a9c1f6487c46 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 10:38:55 +0000 Subject: [PATCH 206/316] 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 b399723081a..e0b05685189 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c06ed89df76febdc32fc835c9d37220c0400821d24f9707c3484054e78e1d94e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1e9ce89f54c7135fad4459c99779782e4acdc4a34ca20508d56546e0aee7ba0.yml From 2e661f04b793428a79f6a1950216b152cf605a5b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 12:14:42 +0000 Subject: [PATCH 207/316] feat(api): OpenAPI spec update via Stainless API (#1172) --- .stats.yml | 2 +- src/cloudflare/_models.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e0b05685189..f22c56405ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1e9ce89f54c7135fad4459c99779782e4acdc4a34ca20508d56546e0aee7ba0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py index 5d95bb4b2b2..eb7ce3bde92 100644 --- a/src/cloudflare/_models.py +++ b/src/cloudflare/_models.py @@ -643,6 +643,14 @@ def validate_type(*, type_: type[_T], value: object) -> _T: return cast(_T, _validate_non_model_type(type_=type_, value=value)) +def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None: + """Add a pydantic config for the given type. + + Note: this is a no-op on Pydantic v1. + """ + setattr(typ, "__pydantic_config__", config) # noqa: B010 + + # our use of subclasssing here causes weirdness for type checkers, # so we just pretend that we don't subclass if TYPE_CHECKING: From 25ddd22e8ebc516a280afd656bea3338de60b92c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 14:52:09 +0000 Subject: [PATCH 208/316] 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 f22c56405ff..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From 68138db1b04b75f831ceb188ebe3e91e805c6615 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 14:54:35 +0000 Subject: [PATCH 209/316] 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 9700240bc5a..f22c56405ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml From 80601e266d77d18e058e0b251bf24eb8139d73e1 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 14:56:52 +0000 Subject: [PATCH 210/316] 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 f22c56405ff..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From 7805fde9b300a107b619ed44d58cd144575bf556 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:43:53 +0000 Subject: [PATCH 211/316] feat(api): OpenAPI spec update via Stainless API (#1173) --- .stats.yml | 2 +- requirements-dev.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9700240bc5a..188ac9d174d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml diff --git a/requirements-dev.lock b/requirements-dev.lock index 12d3582d538..d624bbeb64e 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -49,7 +49,7 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -mypy==1.7.1 +mypy==1.10.1 mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 From 5baa2fc8fd2c2c433389e78d59d5b0904ee92652 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 15:49:30 +0000 Subject: [PATCH 212/316] 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 188ac9d174d..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From e0c241ae0c09686f564fae01f23f03fbeb091ae0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 15:56:00 +0000 Subject: [PATCH 213/316] 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 9700240bc5a..f92b447ada3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml From 58191cba252056dc906a63d41bf99388919d9b91 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 16:31:53 +0000 Subject: [PATCH 214/316] 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 f92b447ada3..28d49463d2a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839a21fba61f217a19e79a3596f508a40fa93cf14c0e03493f961e496ce3873b.yml From 46698df8041fa91f1d7dc1cf66ee6b34c5e5550d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 18:15:07 +0000 Subject: [PATCH 215/316] 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 28d49463d2a..f92b447ada3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839a21fba61f217a19e79a3596f508a40fa93cf14c0e03493f961e496ce3873b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml From b7bf288769f4e9711f109cab5b231cf97ee436b3 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 18:17:24 +0000 Subject: [PATCH 216/316] 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 f92b447ada3..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From 2d1fd82a25085ec8af0f15159219499f3a777512 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 18:19:34 +0000 Subject: [PATCH 217/316] 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 9700240bc5a..188ac9d174d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml From eaa8e7251d7e8e0ef28440c93e0b9f395e89a208 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 19:34:53 +0000 Subject: [PATCH 218/316] 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 188ac9d174d..f92b447ada3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml From 2294aabf9704cff988b7f3ae914276a1957e0ee8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 20:39:00 +0000 Subject: [PATCH 219/316] 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 f92b447ada3..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From befbb9c64aedc39c185eb7cb360177633f1632f4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 21:13:33 +0000 Subject: [PATCH 220/316] 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 9700240bc5a..188ac9d174d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml From e9ed855708d7d4bd33671b789075a7f762091fa6 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 10 Jul 2024 21:15:57 +0000 Subject: [PATCH 221/316] 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 188ac9d174d..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From 04048c52c00d1c4c1838c67c6fd141adaa5f5d31 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 07:50:13 +0000 Subject: [PATCH 222/316] 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 9700240bc5a..188ac9d174d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml From 67e6f18c0d39967f2dfb019c8d4304efffad9da3 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 07:53:28 +0000 Subject: [PATCH 223/316] 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 188ac9d174d..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From 3a7046c27a857c08af086cc6decd77e16e5b728d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 08:18:44 +0000 Subject: [PATCH 224/316] 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 9700240bc5a..28d49463d2a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839a21fba61f217a19e79a3596f508a40fa93cf14c0e03493f961e496ce3873b.yml From 69956609dd8e4d3b49f12d26f281732d094da463 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 08:21:44 +0000 Subject: [PATCH 225/316] 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 28d49463d2a..188ac9d174d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839a21fba61f217a19e79a3596f508a40fa93cf14c0e03493f961e496ce3873b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml From d91fe49512b9fbaef063537ac83e046abdab9321 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 09:55:04 +0000 Subject: [PATCH 226/316] 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 188ac9d174d..f92b447ada3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68a9f3f4531edd1105bde78808d9b582f14f4ccc23856b863fd52473d730bdad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml From 62e392fc33d1bb8ad29cbe0bd871615f4e2229f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:26:12 +0000 Subject: [PATCH 227/316] feat(api): OpenAPI spec update via Stainless API (#1174) --- .github/workflows/ci.yml | 1 + .stats.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 021ad706126..e26df5bda31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: pull_request: branches: - main + - next jobs: lint: diff --git a/.stats.yml b/.stats.yml index f92b447ada3..28d49463d2a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839a21fba61f217a19e79a3596f508a40fa93cf14c0e03493f961e496ce3873b.yml From fa526975d0daedf8bda09bed1678a74a4f6f058b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:19:47 +0000 Subject: [PATCH 228/316] feat(api): OpenAPI spec update via Stainless API (#1175) --- .stats.yml | 2 +- src/cloudflare/resources/accounts/accounts.py | 5 +---- src/cloudflare/resources/accounts/members.py | 5 +---- src/cloudflare/resources/accounts/roles.py | 5 +---- src/cloudflare/resources/acm/total_tls.py | 4 +--- src/cloudflare/resources/addressing/address_maps/accounts.py | 4 +--- .../resources/addressing/address_maps/address_maps.py | 5 +---- src/cloudflare/resources/addressing/address_maps/ips.py | 4 +--- src/cloudflare/resources/addressing/address_maps/zones.py | 4 +--- .../resources/addressing/loa_documents/downloads.py | 4 +--- .../resources/addressing/loa_documents/loa_documents.py | 4 +--- src/cloudflare/resources/addressing/prefixes/bgp/bindings.py | 5 +---- src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py | 5 +---- src/cloudflare/resources/addressing/prefixes/bgp/statuses.py | 4 +--- src/cloudflare/resources/addressing/prefixes/delegations.py | 5 +---- src/cloudflare/resources/addressing/prefixes/prefixes.py | 5 +---- .../addressing/regional_hostnames/regional_hostnames.py | 5 +---- .../resources/addressing/regional_hostnames/regions.py | 5 +---- src/cloudflare/resources/addressing/services.py | 5 +---- src/cloudflare/resources/ai_gateway/ai_gateway.py | 5 +---- src/cloudflare/resources/ai_gateway/logs.py | 5 +---- src/cloudflare/resources/alerting/available_alerts.py | 4 +--- src/cloudflare/resources/alerting/destinations/eligible.py | 4 +--- src/cloudflare/resources/alerting/destinations/pagerduty.py | 4 +--- src/cloudflare/resources/alerting/destinations/webhooks.py | 5 +---- src/cloudflare/resources/alerting/history.py | 5 +---- src/cloudflare/resources/alerting/policies.py | 5 +---- src/cloudflare/resources/api_gateway/configurations.py | 4 +--- src/cloudflare/resources/api_gateway/discovery/discovery.py | 4 +--- src/cloudflare/resources/api_gateway/discovery/operations.py | 5 +---- .../resources/api_gateway/operations/operations.py | 5 +---- .../resources/api_gateway/operations/schema_validation.py | 4 +--- src/cloudflare/resources/api_gateway/schemas.py | 4 +--- .../resources/api_gateway/settings/schema_validation.py | 4 +--- .../resources/api_gateway/user_schemas/operations.py | 5 +---- .../resources/api_gateway/user_schemas/user_schemas.py | 5 +---- src/cloudflare/resources/argo/smart_routing.py | 4 +--- src/cloudflare/resources/argo/tiered_caching.py | 4 +--- src/cloudflare/resources/audit_logs.py | 5 +---- src/cloudflare/resources/billing/profiles.py | 4 +--- src/cloudflare/resources/bot_management.py | 4 +--- src/cloudflare/resources/brand_protection.py | 4 +--- src/cloudflare/resources/cache/cache.py | 4 +--- src/cloudflare/resources/cache/cache_reserve.py | 4 +--- src/cloudflare/resources/cache/regional_tiered_cache.py | 4 +--- src/cloudflare/resources/cache/smart_tiered_cache.py | 4 +--- src/cloudflare/resources/cache/variants.py | 4 +--- src/cloudflare/resources/calls/calls.py | 5 +---- src/cloudflare/resources/calls/turn/keys.py | 5 +---- .../certificate_authorities/hostname_associations.py | 4 +--- src/cloudflare/resources/challenges/widgets.py | 5 +---- src/cloudflare/resources/client_certificates.py | 5 +---- src/cloudflare/resources/cloudforce_one/requests/message.py | 4 +--- src/cloudflare/resources/cloudforce_one/requests/priority.py | 4 +--- src/cloudflare/resources/cloudforce_one/requests/requests.py | 5 +---- .../resources/custom_certificates/custom_certificates.py | 5 +---- src/cloudflare/resources/custom_certificates/prioritize.py | 4 +--- .../resources/custom_hostnames/custom_hostnames.py | 5 +---- src/cloudflare/resources/custom_hostnames/fallback_origin.py | 4 +--- src/cloudflare/resources/custom_nameservers.py | 4 +--- src/cloudflare/resources/d1/database.py | 5 +---- src/cloudflare/resources/dcv_delegation.py | 4 +--- src/cloudflare/resources/diagnostics/traceroutes.py | 4 +--- src/cloudflare/resources/dns/analytics/reports/bytimes.py | 4 +--- src/cloudflare/resources/dns/analytics/reports/reports.py | 4 +--- .../resources/dns/firewall/analytics/reports/bytimes.py | 4 +--- .../resources/dns/firewall/analytics/reports/reports.py | 4 +--- src/cloudflare/resources/dns/firewall/firewall.py | 5 +---- src/cloudflare/resources/dns/records.py | 5 +---- src/cloudflare/resources/dns/settings.py | 4 +--- src/cloudflare/resources/dnssec.py | 4 +--- .../resources/durable_objects/namespaces/namespaces.py | 5 +---- .../resources/durable_objects/namespaces/objects.py | 5 +---- src/cloudflare/resources/email_routing/addresses.py | 5 +---- src/cloudflare/resources/email_routing/dns.py | 4 +--- src/cloudflare/resources/email_routing/email_routing.py | 4 +--- src/cloudflare/resources/email_routing/rules/catch_alls.py | 4 +--- src/cloudflare/resources/email_routing/rules/rules.py | 5 +---- .../event_notifications/r2/configuration/configuration.py | 4 +--- .../resources/event_notifications/r2/configuration/queues.py | 4 +--- src/cloudflare/resources/filters.py | 5 +---- src/cloudflare/resources/firewall/access_rules.py | 5 +---- src/cloudflare/resources/firewall/lockdowns.py | 5 +---- src/cloudflare/resources/firewall/rules.py | 5 +---- src/cloudflare/resources/firewall/ua_rules.py | 5 +---- src/cloudflare/resources/firewall/waf/overrides.py | 5 +---- src/cloudflare/resources/firewall/waf/packages/groups.py | 5 +---- src/cloudflare/resources/firewall/waf/packages/packages.py | 5 +---- src/cloudflare/resources/firewall/waf/packages/rules.py | 5 +---- src/cloudflare/resources/healthchecks/healthchecks.py | 5 +---- src/cloudflare/resources/healthchecks/previews.py | 4 +--- src/cloudflare/resources/hostnames/settings/tls.py | 4 +--- src/cloudflare/resources/hyperdrive/configs.py | 5 +---- src/cloudflare/resources/iam/permission_groups.py | 5 +---- src/cloudflare/resources/iam/resource_groups.py | 5 +---- src/cloudflare/resources/images/v1/blobs.py | 4 +--- src/cloudflare/resources/images/v1/keys.py | 4 +--- src/cloudflare/resources/images/v1/stats.py | 4 +--- src/cloudflare/resources/images/v1/v1.py | 5 +---- src/cloudflare/resources/images/v1/variants.py | 4 +--- src/cloudflare/resources/images/v2/direct_uploads.py | 4 +--- src/cloudflare/resources/images/v2/v2.py | 4 +--- src/cloudflare/resources/intel/asn/asn.py | 4 +--- src/cloudflare/resources/intel/asn/subnets.py | 4 +--- .../resources/intel/attack_surface_report/issue_types.py | 4 +--- .../resources/intel/attack_surface_report/issues.py | 5 +---- src/cloudflare/resources/intel/dns.py | 5 +---- src/cloudflare/resources/intel/domain_history.py | 4 +--- src/cloudflare/resources/intel/domains/bulks.py | 4 +--- src/cloudflare/resources/intel/domains/domains.py | 4 +--- .../resources/intel/indicator_feeds/indicator_feeds.py | 5 +---- .../resources/intel/indicator_feeds/permissions.py | 4 +--- src/cloudflare/resources/intel/indicator_feeds/snapshots.py | 4 +--- src/cloudflare/resources/intel/ip_lists.py | 4 +--- src/cloudflare/resources/intel/ips.py | 4 +--- src/cloudflare/resources/intel/miscategorizations.py | 4 +--- src/cloudflare/resources/intel/sinkholes.py | 5 +---- src/cloudflare/resources/intel/whois.py | 4 +--- src/cloudflare/resources/ips.py | 4 +--- src/cloudflare/resources/keyless_certificates.py | 5 +---- src/cloudflare/resources/kv/namespaces/bulk.py | 4 +--- src/cloudflare/resources/kv/namespaces/keys.py | 5 +---- src/cloudflare/resources/kv/namespaces/metadata.py | 4 +--- src/cloudflare/resources/kv/namespaces/namespaces.py | 5 +---- src/cloudflare/resources/kv/namespaces/values.py | 4 +--- src/cloudflare/resources/load_balancers/load_balancers.py | 5 +---- src/cloudflare/resources/load_balancers/monitors/monitors.py | 5 +---- src/cloudflare/resources/load_balancers/monitors/previews.py | 4 +--- .../resources/load_balancers/monitors/references.py | 4 +--- src/cloudflare/resources/load_balancers/pools/health.py | 4 +--- src/cloudflare/resources/load_balancers/pools/pools.py | 5 +---- src/cloudflare/resources/load_balancers/pools/references.py | 4 +--- src/cloudflare/resources/load_balancers/previews.py | 4 +--- src/cloudflare/resources/load_balancers/regions.py | 4 +--- src/cloudflare/resources/load_balancers/searches.py | 4 +--- src/cloudflare/resources/logpush/datasets/fields.py | 4 +--- src/cloudflare/resources/logpush/datasets/jobs.py | 4 +--- src/cloudflare/resources/logpush/edge.py | 4 +--- src/cloudflare/resources/logpush/jobs.py | 5 +---- src/cloudflare/resources/logpush/ownership.py | 4 +--- src/cloudflare/resources/logpush/validate.py | 4 +--- src/cloudflare/resources/logs/control/cmb/config.py | 4 +--- src/cloudflare/resources/logs/control/retention.py | 4 +--- src/cloudflare/resources/logs/rayid.py | 4 +--- src/cloudflare/resources/logs/received/fields.py | 4 +--- src/cloudflare/resources/logs/received/received.py | 4 +--- .../resources/magic_network_monitoring/configs/configs.py | 4 +--- .../resources/magic_network_monitoring/configs/full.py | 4 +--- .../magic_network_monitoring/rules/advertisements.py | 4 +--- .../resources/magic_network_monitoring/rules/rules.py | 5 +---- src/cloudflare/resources/magic_transit/apps.py | 5 +---- src/cloudflare/resources/magic_transit/cf_interconnects.py | 4 +--- src/cloudflare/resources/magic_transit/connectors.py | 5 +---- src/cloudflare/resources/magic_transit/gre_tunnels.py | 4 +--- src/cloudflare/resources/magic_transit/ipsec_tunnels.py | 4 +--- src/cloudflare/resources/magic_transit/routes.py | 4 +--- src/cloudflare/resources/magic_transit/sites/acls.py | 5 +---- src/cloudflare/resources/magic_transit/sites/lans.py | 5 +---- src/cloudflare/resources/magic_transit/sites/sites.py | 5 +---- src/cloudflare/resources/magic_transit/sites/wans.py | 5 +---- src/cloudflare/resources/managed_headers.py | 4 +--- src/cloudflare/resources/memberships.py | 5 +---- src/cloudflare/resources/mtls_certificates/associations.py | 4 +--- .../resources/mtls_certificates/mtls_certificates.py | 5 +---- src/cloudflare/resources/origin_ca_certificates.py | 5 +---- src/cloudflare/resources/origin_post_quantum_encryption.py | 4 +--- .../origin_tls_client_auth/hostnames/certificates.py | 5 +---- .../resources/origin_tls_client_auth/hostnames/hostnames.py | 4 +--- .../origin_tls_client_auth/origin_tls_client_auth.py | 5 +---- src/cloudflare/resources/origin_tls_client_auth/settings.py | 4 +--- src/cloudflare/resources/page_shield/connections.py | 5 +---- src/cloudflare/resources/page_shield/cookies.py | 5 +---- src/cloudflare/resources/page_shield/page_shield.py | 4 +--- src/cloudflare/resources/page_shield/policies.py | 5 +---- src/cloudflare/resources/page_shield/scripts.py | 5 +---- src/cloudflare/resources/pagerules/pagerules.py | 4 +--- src/cloudflare/resources/pagerules/settings.py | 4 +--- .../resources/pages/projects/deployments/deployments.py | 5 +---- .../resources/pages/projects/deployments/history/logs.py | 4 +--- src/cloudflare/resources/pages/projects/domains.py | 5 +---- src/cloudflare/resources/pages/projects/projects.py | 5 +---- src/cloudflare/resources/pcaps/download.py | 4 +--- src/cloudflare/resources/pcaps/ownership.py | 4 +--- src/cloudflare/resources/pcaps/pcaps.py | 5 +---- src/cloudflare/resources/plans.py | 5 +---- src/cloudflare/resources/queues/consumers.py | 4 +--- src/cloudflare/resources/queues/messages.py | 4 +--- src/cloudflare/resources/queues/queues.py | 5 +---- src/cloudflare/resources/r2/buckets.py | 5 +---- src/cloudflare/resources/r2/sippy.py | 4 +--- src/cloudflare/resources/r2/temporary_credentials.py | 4 +--- src/cloudflare/resources/radar/annotations/outages.py | 4 +--- src/cloudflare/resources/radar/as112/as112.py | 4 +--- src/cloudflare/resources/radar/as112/summary.py | 4 +--- src/cloudflare/resources/radar/as112/timeseries_groups.py | 4 +--- src/cloudflare/resources/radar/as112/top.py | 4 +--- src/cloudflare/resources/radar/attacks/layer3/layer3.py | 4 +--- src/cloudflare/resources/radar/attacks/layer3/summary.py | 4 +--- .../resources/radar/attacks/layer3/timeseries_groups.py | 4 +--- .../resources/radar/attacks/layer3/top/locations.py | 4 +--- src/cloudflare/resources/radar/attacks/layer3/top/top.py | 4 +--- src/cloudflare/resources/radar/attacks/layer7/layer7.py | 4 +--- src/cloudflare/resources/radar/attacks/layer7/summary.py | 4 +--- .../resources/radar/attacks/layer7/timeseries_groups.py | 4 +--- src/cloudflare/resources/radar/attacks/layer7/top/ases.py | 4 +--- .../resources/radar/attacks/layer7/top/locations.py | 4 +--- src/cloudflare/resources/radar/attacks/layer7/top/top.py | 4 +--- src/cloudflare/resources/radar/bgp/bgp.py | 4 +--- src/cloudflare/resources/radar/bgp/hijacks/events.py | 5 +---- src/cloudflare/resources/radar/bgp/ips.py | 4 +--- src/cloudflare/resources/radar/bgp/leaks/events.py | 5 +---- src/cloudflare/resources/radar/bgp/routes.py | 4 +--- src/cloudflare/resources/radar/bgp/top/ases.py | 4 +--- src/cloudflare/resources/radar/bgp/top/top.py | 4 +--- src/cloudflare/resources/radar/connection_tampering.py | 4 +--- src/cloudflare/resources/radar/datasets.py | 4 +--- src/cloudflare/resources/radar/dns/top.py | 4 +--- src/cloudflare/resources/radar/email/routing/summary.py | 4 +--- .../resources/radar/email/routing/timeseries_groups.py | 4 +--- src/cloudflare/resources/radar/email/security/summary.py | 4 +--- .../resources/radar/email/security/timeseries_groups.py | 4 +--- .../resources/radar/email/security/top/tlds/malicious.py | 4 +--- .../resources/radar/email/security/top/tlds/spam.py | 4 +--- .../resources/radar/email/security/top/tlds/spoof.py | 4 +--- .../resources/radar/email/security/top/tlds/tlds.py | 4 +--- src/cloudflare/resources/radar/entities/asns.py | 4 +--- src/cloudflare/resources/radar/entities/entities.py | 4 +--- src/cloudflare/resources/radar/entities/locations.py | 4 +--- src/cloudflare/resources/radar/http/ases/ases.py | 4 +--- src/cloudflare/resources/radar/http/ases/bot_class.py | 4 +--- src/cloudflare/resources/radar/http/ases/browser_family.py | 4 +--- src/cloudflare/resources/radar/http/ases/device_type.py | 4 +--- src/cloudflare/resources/radar/http/ases/http_method.py | 4 +--- src/cloudflare/resources/radar/http/ases/http_protocol.py | 4 +--- src/cloudflare/resources/radar/http/ases/ip_version.py | 4 +--- src/cloudflare/resources/radar/http/ases/os.py | 4 +--- src/cloudflare/resources/radar/http/ases/tls_version.py | 4 +--- src/cloudflare/resources/radar/http/http.py | 4 +--- src/cloudflare/resources/radar/http/locations/bot_class.py | 4 +--- .../resources/radar/http/locations/browser_family.py | 4 +--- src/cloudflare/resources/radar/http/locations/device_type.py | 4 +--- src/cloudflare/resources/radar/http/locations/http_method.py | 4 +--- .../resources/radar/http/locations/http_protocol.py | 4 +--- src/cloudflare/resources/radar/http/locations/ip_version.py | 4 +--- src/cloudflare/resources/radar/http/locations/locations.py | 4 +--- src/cloudflare/resources/radar/http/locations/os.py | 4 +--- src/cloudflare/resources/radar/http/locations/tls_version.py | 4 +--- src/cloudflare/resources/radar/http/summary.py | 4 +--- src/cloudflare/resources/radar/http/timeseries_groups.py | 4 +--- src/cloudflare/resources/radar/http/top.py | 4 +--- src/cloudflare/resources/radar/netflows/netflows.py | 4 +--- src/cloudflare/resources/radar/netflows/top.py | 4 +--- src/cloudflare/resources/radar/quality/iqi.py | 4 +--- src/cloudflare/resources/radar/quality/speed/speed.py | 4 +--- src/cloudflare/resources/radar/quality/speed/top.py | 4 +--- src/cloudflare/resources/radar/ranking/domain.py | 4 +--- src/cloudflare/resources/radar/ranking/ranking.py | 4 +--- src/cloudflare/resources/radar/search.py | 4 +--- .../resources/radar/traffic_anomalies/locations.py | 4 +--- .../resources/radar/traffic_anomalies/traffic_anomalies.py | 4 +--- src/cloudflare/resources/radar/verified_bots/top.py | 4 +--- src/cloudflare/resources/rate_limits.py | 5 +---- src/cloudflare/resources/rate_plans.py | 4 +--- src/cloudflare/resources/registrar/domains.py | 5 +---- src/cloudflare/resources/request_tracers/traces.py | 4 +--- src/cloudflare/resources/rules/lists/bulk_operations.py | 4 +--- src/cloudflare/resources/rules/lists/items.py | 5 +---- src/cloudflare/resources/rules/lists/lists.py | 5 +---- src/cloudflare/resources/rulesets/phases/phases.py | 4 +--- src/cloudflare/resources/rulesets/phases/versions.py | 5 +---- src/cloudflare/resources/rulesets/rules.py | 4 +--- src/cloudflare/resources/rulesets/rulesets.py | 5 +---- src/cloudflare/resources/rulesets/versions/by_tag.py | 4 +--- src/cloudflare/resources/rulesets/versions/versions.py | 5 +---- src/cloudflare/resources/rum/rules.py | 4 +--- src/cloudflare/resources/rum/site_info.py | 5 +---- src/cloudflare/resources/secondary_dns/acls.py | 5 +---- src/cloudflare/resources/secondary_dns/force_axfr.py | 4 +--- src/cloudflare/resources/secondary_dns/incoming.py | 4 +--- src/cloudflare/resources/secondary_dns/outgoing/outgoing.py | 4 +--- src/cloudflare/resources/secondary_dns/outgoing/status.py | 4 +--- src/cloudflare/resources/secondary_dns/peers.py | 5 +---- src/cloudflare/resources/secondary_dns/tsigs.py | 5 +---- src/cloudflare/resources/snippets/content.py | 4 +--- src/cloudflare/resources/snippets/rules.py | 5 +---- src/cloudflare/resources/snippets/snippets.py | 5 +---- .../resources/spectrum/analytics/aggregates/currents.py | 4 +--- .../resources/spectrum/analytics/events/bytimes.py | 4 +--- .../resources/spectrum/analytics/events/summaries.py | 4 +--- src/cloudflare/resources/spectrum/apps.py | 5 +---- src/cloudflare/resources/speed/availabilities.py | 4 +--- src/cloudflare/resources/speed/pages/pages.py | 5 +---- src/cloudflare/resources/speed/pages/tests.py | 4 +--- src/cloudflare/resources/speed/schedule.py | 4 +--- src/cloudflare/resources/ssl/analyze.py | 4 +--- .../resources/ssl/certificate_packs/certificate_packs.py | 5 +---- src/cloudflare/resources/ssl/certificate_packs/order.py | 4 +--- src/cloudflare/resources/ssl/certificate_packs/quota.py | 4 +--- src/cloudflare/resources/ssl/recommendations.py | 4 +--- src/cloudflare/resources/ssl/universal/settings.py | 4 +--- src/cloudflare/resources/ssl/verification.py | 4 +--- src/cloudflare/resources/storage/analytics.py | 4 +--- src/cloudflare/resources/stream/audio_tracks.py | 4 +--- src/cloudflare/resources/stream/captions/captions.py | 4 +--- .../resources/stream/captions/language/language.py | 4 +--- src/cloudflare/resources/stream/captions/language/vtt.py | 4 +--- src/cloudflare/resources/stream/clip.py | 4 +--- src/cloudflare/resources/stream/copy.py | 4 +--- src/cloudflare/resources/stream/direct_upload.py | 4 +--- src/cloudflare/resources/stream/downloads.py | 4 +--- src/cloudflare/resources/stream/embed.py | 4 +--- src/cloudflare/resources/stream/keys.py | 4 +--- src/cloudflare/resources/stream/live_inputs/live_inputs.py | 4 +--- src/cloudflare/resources/stream/live_inputs/outputs.py | 5 +---- src/cloudflare/resources/stream/stream.py | 5 +---- src/cloudflare/resources/stream/token.py | 4 +--- src/cloudflare/resources/stream/videos.py | 4 +--- src/cloudflare/resources/stream/watermarks.py | 5 +---- src/cloudflare/resources/stream/webhooks.py | 4 +--- src/cloudflare/resources/subscriptions.py | 5 +---- src/cloudflare/resources/url_normalization.py | 4 +--- src/cloudflare/resources/url_scanner/scans.py | 4 +--- src/cloudflare/resources/url_scanner/url_scanner.py | 4 +--- src/cloudflare/resources/user/audit_logs.py | 5 +---- src/cloudflare/resources/user/billing/history.py | 5 +---- src/cloudflare/resources/user/billing/profile.py | 4 +--- src/cloudflare/resources/user/invites.py | 5 +---- src/cloudflare/resources/user/organizations.py | 5 +---- src/cloudflare/resources/user/subscriptions.py | 4 +--- src/cloudflare/resources/user/tokens/permission_groups.py | 5 +---- src/cloudflare/resources/user/tokens/tokens.py | 5 +---- src/cloudflare/resources/user/tokens/value.py | 4 +--- src/cloudflare/resources/user/user.py | 4 +--- src/cloudflare/resources/vectorize/indexes.py | 5 +---- src/cloudflare/resources/waiting_rooms/events/details.py | 4 +--- src/cloudflare/resources/waiting_rooms/events/events.py | 5 +---- src/cloudflare/resources/waiting_rooms/page.py | 4 +--- src/cloudflare/resources/waiting_rooms/rules.py | 5 +---- src/cloudflare/resources/waiting_rooms/settings.py | 4 +--- src/cloudflare/resources/waiting_rooms/statuses.py | 4 +--- src/cloudflare/resources/waiting_rooms/waiting_rooms.py | 5 +---- src/cloudflare/resources/warp_connector.py | 5 +---- src/cloudflare/resources/web3/hostnames/hostnames.py | 5 +---- .../ipfs_universal_paths/content_lists/content_lists.py | 4 +--- .../hostnames/ipfs_universal_paths/content_lists/entries.py | 4 +--- src/cloudflare/resources/workers/account_settings.py | 4 +--- src/cloudflare/resources/workers/ai/ai.py | 4 +--- src/cloudflare/resources/workers/ai/models/schema.py | 4 +--- src/cloudflare/resources/workers/domains.py | 5 +---- src/cloudflare/resources/workers/scripts/content.py | 4 +--- src/cloudflare/resources/workers/scripts/deployments.py | 4 +--- src/cloudflare/resources/workers/scripts/schedules.py | 4 +--- src/cloudflare/resources/workers/scripts/scripts.py | 5 +---- src/cloudflare/resources/workers/scripts/settings.py | 4 +--- src/cloudflare/resources/workers/scripts/tail.py | 4 +--- src/cloudflare/resources/workers/scripts/versions.py | 5 +---- src/cloudflare/resources/workers/subdomains.py | 4 +--- .../workers_for_platforms/dispatch/namespaces/namespaces.py | 5 +---- .../dispatch/namespaces/scripts/bindings.py | 4 +--- .../dispatch/namespaces/scripts/content.py | 4 +--- .../dispatch/namespaces/scripts/scripts.py | 4 +--- .../dispatch/namespaces/scripts/secrets.py | 5 +---- .../dispatch/namespaces/scripts/settings.py | 4 +--- .../dispatch/namespaces/scripts/tags.py | 5 +---- .../resources/zero_trust/access/applications/applications.py | 5 +---- .../resources/zero_trust/access/applications/cas.py | 5 +---- .../resources/zero_trust/access/applications/policies.py | 5 +---- .../zero_trust/access/applications/user_policy_checks.py | 4 +--- src/cloudflare/resources/zero_trust/access/bookmarks.py | 5 +---- .../resources/zero_trust/access/certificates/certificates.py | 5 +---- .../resources/zero_trust/access/certificates/settings.py | 4 +--- src/cloudflare/resources/zero_trust/access/custom_pages.py | 5 +---- src/cloudflare/resources/zero_trust/access/groups.py | 5 +---- src/cloudflare/resources/zero_trust/access/keys.py | 4 +--- .../resources/zero_trust/access/logs/access_requests.py | 4 +--- src/cloudflare/resources/zero_trust/access/policies.py | 5 +---- src/cloudflare/resources/zero_trust/access/service_tokens.py | 5 +---- src/cloudflare/resources/zero_trust/access/tags.py | 5 +---- .../resources/zero_trust/access/users/active_sessions.py | 5 +---- .../resources/zero_trust/access/users/failed_logins.py | 5 +---- .../resources/zero_trust/access/users/last_seen_identity.py | 4 +--- src/cloudflare/resources/zero_trust/access/users/users.py | 5 +---- src/cloudflare/resources/zero_trust/connectivity_settings.py | 4 +--- src/cloudflare/resources/zero_trust/devices/devices.py | 5 +---- src/cloudflare/resources/zero_trust/devices/dex_tests.py | 5 +---- src/cloudflare/resources/zero_trust/devices/networks.py | 5 +---- .../resources/zero_trust/devices/override_codes.py | 4 +--- .../resources/zero_trust/devices/policies/default_policy.py | 4 +--- .../resources/zero_trust/devices/policies/excludes.py | 5 +---- .../zero_trust/devices/policies/fallback_domains.py | 5 +---- .../resources/zero_trust/devices/policies/includes.py | 5 +---- .../resources/zero_trust/devices/policies/policies.py | 5 +---- .../resources/zero_trust/devices/posture/integrations.py | 5 +---- .../resources/zero_trust/devices/posture/posture.py | 5 +---- src/cloudflare/resources/zero_trust/devices/revoke.py | 4 +--- src/cloudflare/resources/zero_trust/devices/settings.py | 4 +--- src/cloudflare/resources/zero_trust/devices/unrevoke.py | 4 +--- src/cloudflare/resources/zero_trust/dex/colos.py | 5 +---- .../resources/zero_trust/dex/fleet_status/devices.py | 5 +---- .../resources/zero_trust/dex/fleet_status/fleet_status.py | 4 +--- .../resources/zero_trust/dex/http_tests/http_tests.py | 4 +--- .../resources/zero_trust/dex/http_tests/percentiles.py | 4 +--- src/cloudflare/resources/zero_trust/dex/tests/tests.py | 5 +---- .../resources/zero_trust/dex/tests/unique_devices.py | 4 +--- .../zero_trust/dex/traceroute_test_results/network_path.py | 4 +--- src/cloudflare/resources/zero_trust/dex/traceroute_tests.py | 4 +--- src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py | 5 +---- src/cloudflare/resources/zero_trust/dlp/datasets/upload.py | 4 +--- src/cloudflare/resources/zero_trust/dlp/patterns.py | 4 +--- src/cloudflare/resources/zero_trust/dlp/payload_logs.py | 4 +--- src/cloudflare/resources/zero_trust/dlp/profiles/custom.py | 4 +--- .../resources/zero_trust/dlp/profiles/predefined.py | 4 +--- src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py | 5 +---- src/cloudflare/resources/zero_trust/gateway/app_types.py | 5 +---- .../resources/zero_trust/gateway/audit_ssh_settings.py | 4 +--- src/cloudflare/resources/zero_trust/gateway/categories.py | 5 +---- src/cloudflare/resources/zero_trust/gateway/certificates.py | 5 +---- .../resources/zero_trust/gateway/configurations.py | 4 +--- src/cloudflare/resources/zero_trust/gateway/gateway.py | 4 +--- src/cloudflare/resources/zero_trust/gateway/lists/items.py | 5 +---- src/cloudflare/resources/zero_trust/gateway/lists/lists.py | 5 +---- src/cloudflare/resources/zero_trust/gateway/locations.py | 5 +---- src/cloudflare/resources/zero_trust/gateway/logging.py | 4 +--- .../resources/zero_trust/gateway/proxy_endpoints.py | 4 +--- src/cloudflare/resources/zero_trust/gateway/rules.py | 5 +---- src/cloudflare/resources/zero_trust/identity_providers.py | 5 +---- src/cloudflare/resources/zero_trust/networks/routes/ips.py | 4 +--- .../resources/zero_trust/networks/routes/networks.py | 4 +--- .../resources/zero_trust/networks/routes/routes.py | 5 +---- .../resources/zero_trust/networks/virtual_networks.py | 5 +---- src/cloudflare/resources/zero_trust/organizations.py | 4 +--- .../resources/zero_trust/risk_scoring/behaviours.py | 4 +--- .../zero_trust/risk_scoring/integrations/integrations.py | 5 +---- .../zero_trust/risk_scoring/integrations/references.py | 4 +--- .../resources/zero_trust/risk_scoring/risk_scoring.py | 4 +--- src/cloudflare/resources/zero_trust/risk_scoring/summary.py | 4 +--- src/cloudflare/resources/zero_trust/seats.py | 4 +--- .../resources/zero_trust/tunnels/configurations.py | 4 +--- src/cloudflare/resources/zero_trust/tunnels/connections.py | 4 +--- src/cloudflare/resources/zero_trust/tunnels/connectors.py | 4 +--- src/cloudflare/resources/zero_trust/tunnels/management.py | 4 +--- src/cloudflare/resources/zero_trust/tunnels/token.py | 4 +--- src/cloudflare/resources/zero_trust/tunnels/tunnels.py | 5 +---- src/cloudflare/resources/zones/activation_check.py | 4 +--- src/cloudflare/resources/zones/custom_nameservers.py | 4 +--- src/cloudflare/resources/zones/holds.py | 4 +--- src/cloudflare/resources/zones/settings.py | 4 +--- src/cloudflare/resources/zones/subscriptions.py | 5 +---- src/cloudflare/resources/zones/zones.py | 5 +---- 449 files changed, 449 insertions(+), 1509 deletions(-) diff --git a/.stats.yml b/.stats.yml index 28d49463d2a..f92b447ada3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839a21fba61f217a19e79a3596f508a40fa93cf14c0e03493f961e496ce3873b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml diff --git a/src/cloudflare/resources/accounts/accounts.py b/src/cloudflare/resources/accounts/accounts.py index 75b2a0e8fbe..2d48d9dfe99 100644 --- a/src/cloudflare/resources/accounts/accounts.py +++ b/src/cloudflare/resources/accounts/accounts.py @@ -38,10 +38,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.accounts import account_list_params, account_update_params __all__ = ["AccountsResource", "AsyncAccountsResource"] diff --git a/src/cloudflare/resources/accounts/members.py b/src/cloudflare/resources/accounts/members.py index ab13b631e8f..97716de0279 100644 --- a/src/cloudflare/resources/accounts/members.py +++ b/src/cloudflare/resources/accounts/members.py @@ -23,10 +23,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.accounts import member_list_params, member_create_params, member_update_params from ...types.accounts.member_get_response import MemberGetResponse from ...types.accounts.member_list_response import MemberListResponse diff --git a/src/cloudflare/resources/accounts/roles.py b/src/cloudflare/resources/accounts/roles.py index 16c89ca10dd..f23d3aa498c 100644 --- a/src/cloudflare/resources/accounts/roles.py +++ b/src/cloudflare/resources/accounts/roles.py @@ -17,10 +17,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.shared.role import Role __all__ = ["RolesResource", "AsyncRolesResource"] diff --git a/src/cloudflare/resources/acm/total_tls.py b/src/cloudflare/resources/acm/total_tls.py index 1282d909aa4..22877d9f1a8 100644 --- a/src/cloudflare/resources/acm/total_tls.py +++ b/src/cloudflare/resources/acm/total_tls.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.acm import CertificateAuthority, total_tls_create_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.acm.certificate_authority import CertificateAuthority from ...types.acm.total_tls_get_response import TotalTLSGetResponse from ...types.acm.total_tls_create_response import TotalTLSCreateResponse diff --git a/src/cloudflare/resources/addressing/address_maps/accounts.py b/src/cloudflare/resources/addressing/address_maps/accounts.py index d48154dcb04..a7a4e27322c 100644 --- a/src/cloudflare/resources/addressing/address_maps/accounts.py +++ b/src/cloudflare/resources/addressing/address_maps/accounts.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.addressing.address_maps import account_update_params from ....types.addressing.address_maps.account_delete_response import AccountDeleteResponse from ....types.addressing.address_maps.account_update_response import AccountUpdateResponse diff --git a/src/cloudflare/resources/addressing/address_maps/address_maps.py b/src/cloudflare/resources/addressing/address_maps/address_maps.py index c92ddd937a3..755134df84f 100644 --- a/src/cloudflare/resources/addressing/address_maps/address_maps.py +++ b/src/cloudflare/resources/addressing/address_maps/address_maps.py @@ -45,10 +45,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.addressing import address_map_edit_params, address_map_create_params from ....types.addressing.address_map import AddressMap from ....types.addressing.address_map_get_response import AddressMapGetResponse diff --git a/src/cloudflare/resources/addressing/address_maps/ips.py b/src/cloudflare/resources/addressing/address_maps/ips.py index afabfb17ecf..e9edf9881fe 100644 --- a/src/cloudflare/resources/addressing/address_maps/ips.py +++ b/src/cloudflare/resources/addressing/address_maps/ips.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.addressing.address_maps import ip_update_params from ....types.addressing.address_maps.ip_delete_response import IPDeleteResponse from ....types.addressing.address_maps.ip_update_response import IPUpdateResponse diff --git a/src/cloudflare/resources/addressing/address_maps/zones.py b/src/cloudflare/resources/addressing/address_maps/zones.py index adb801b9671..cf592d92645 100644 --- a/src/cloudflare/resources/addressing/address_maps/zones.py +++ b/src/cloudflare/resources/addressing/address_maps/zones.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.addressing.address_maps import zone_update_params from ....types.addressing.address_maps.zone_delete_response import ZoneDeleteResponse from ....types.addressing.address_maps.zone_update_response import ZoneUpdateResponse diff --git a/src/cloudflare/resources/addressing/loa_documents/downloads.py b/src/cloudflare/resources/addressing/loa_documents/downloads.py index e333bc3e986..5540d005306 100644 --- a/src/cloudflare/resources/addressing/loa_documents/downloads.py +++ b/src/cloudflare/resources/addressing/loa_documents/downloads.py @@ -19,9 +19,7 @@ async_to_custom_raw_response_wrapper, async_to_custom_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options __all__ = ["DownloadsResource", "AsyncDownloadsResource"] diff --git a/src/cloudflare/resources/addressing/loa_documents/loa_documents.py b/src/cloudflare/resources/addressing/loa_documents/loa_documents.py index 28c6428ca39..a783c0551a0 100644 --- a/src/cloudflare/resources/addressing/loa_documents/loa_documents.py +++ b/src/cloudflare/resources/addressing/loa_documents/loa_documents.py @@ -28,9 +28,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.addressing import loa_document_create_params from ....types.addressing.loa_document_create_response import LOADocumentCreateResponse diff --git a/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py b/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py index ffa7d4bda3d..a2c7b0f566e 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py @@ -21,10 +21,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.addressing.prefixes.bgp import binding_create_params from .....types.addressing.prefixes.bgp.service_binding import ServiceBinding from .....types.addressing.prefixes.bgp.binding_delete_response import BindingDeleteResponse diff --git a/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py b/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py index fc337311031..a2a444a4c68 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py @@ -21,10 +21,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.addressing.prefixes.bgp import prefix_edit_params from .....types.addressing.prefixes.bgp.bgp_prefix import BGPPrefix diff --git a/src/cloudflare/resources/addressing/prefixes/bgp/statuses.py b/src/cloudflare/resources/addressing/prefixes/bgp/statuses.py index aca3d146bc4..065c28d426e 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp/statuses.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp/statuses.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.addressing.prefixes.bgp import status_edit_params from .....types.addressing.prefixes.bgp.status_get_response import StatusGetResponse from .....types.addressing.prefixes.bgp.status_edit_response import StatusEditResponse diff --git a/src/cloudflare/resources/addressing/prefixes/delegations.py b/src/cloudflare/resources/addressing/prefixes/delegations.py index 193d76d1c01..1fed5c0a3ba 100644 --- a/src/cloudflare/resources/addressing/prefixes/delegations.py +++ b/src/cloudflare/resources/addressing/prefixes/delegations.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.addressing.prefixes import delegation_create_params from ....types.addressing.prefixes.delegations import Delegations from ....types.addressing.prefixes.delegation_delete_response import DelegationDeleteResponse diff --git a/src/cloudflare/resources/addressing/prefixes/prefixes.py b/src/cloudflare/resources/addressing/prefixes/prefixes.py index f7eb058f695..ee43ea753db 100644 --- a/src/cloudflare/resources/addressing/prefixes/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/prefixes.py @@ -38,10 +38,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.addressing import prefix_edit_params, prefix_create_params from ....types.addressing.prefix import Prefix from ....types.addressing.prefix_delete_response import PrefixDeleteResponse diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py b/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py index 1524d3e06bc..1c719b3da72 100644 --- a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py +++ b/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py @@ -29,10 +29,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.addressing import regional_hostname_edit_params, regional_hostname_create_params from ....types.addressing.regional_hostname_get_response import RegionalHostnameGetResponse from ....types.addressing.regional_hostname_edit_response import RegionalHostnameEditResponse diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regions.py b/src/cloudflare/resources/addressing/regional_hostnames/regions.py index 7340ffab77f..c3432d5cb2b 100644 --- a/src/cloudflare/resources/addressing/regional_hostnames/regions.py +++ b/src/cloudflare/resources/addressing/regional_hostnames/regions.py @@ -14,10 +14,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.addressing.regional_hostnames.region_list_response import RegionListResponse __all__ = ["RegionsResource", "AsyncRegionsResource"] diff --git a/src/cloudflare/resources/addressing/services.py b/src/cloudflare/resources/addressing/services.py index 4b97ccde1a2..ff6ef55cfa2 100644 --- a/src/cloudflare/resources/addressing/services.py +++ b/src/cloudflare/resources/addressing/services.py @@ -14,10 +14,7 @@ async_to_streamed_response_wrapper, ) from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.addressing.service_list_response import ServiceListResponse __all__ = ["ServicesResource", "AsyncServicesResource"] diff --git a/src/cloudflare/resources/ai_gateway/ai_gateway.py b/src/cloudflare/resources/ai_gateway/ai_gateway.py index ac5a9237f0b..6d75bfb8ba3 100644 --- a/src/cloudflare/resources/ai_gateway/ai_gateway.py +++ b/src/cloudflare/resources/ai_gateway/ai_gateway.py @@ -30,10 +30,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.ai_gateway import ai_gateway_list_params, ai_gateway_create_params, ai_gateway_update_params from ...types.ai_gateway.ai_gateway_get_response import AIGatewayGetResponse from ...types.ai_gateway.ai_gateway_list_response import AIGatewayListResponse diff --git a/src/cloudflare/resources/ai_gateway/logs.py b/src/cloudflare/resources/ai_gateway/logs.py index 58f38d09fbc..4ddf4d28468 100644 --- a/src/cloudflare/resources/ai_gateway/logs.py +++ b/src/cloudflare/resources/ai_gateway/logs.py @@ -19,10 +19,7 @@ async_to_streamed_response_wrapper, ) from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +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 diff --git a/src/cloudflare/resources/alerting/available_alerts.py b/src/cloudflare/resources/alerting/available_alerts.py index b6c6a2d8327..8ededcc6759 100644 --- a/src/cloudflare/resources/alerting/available_alerts.py +++ b/src/cloudflare/resources/alerting/available_alerts.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.alerting.available_alert_list_response import AvailableAlertListResponse __all__ = ["AvailableAlertsResource", "AsyncAvailableAlertsResource"] diff --git a/src/cloudflare/resources/alerting/destinations/eligible.py b/src/cloudflare/resources/alerting/destinations/eligible.py index 25d24519dce..9f330cc89c6 100644 --- a/src/cloudflare/resources/alerting/destinations/eligible.py +++ b/src/cloudflare/resources/alerting/destinations/eligible.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.alerting.destinations.eligible_get_response import EligibleGetResponse __all__ = ["EligibleResource", "AsyncEligibleResource"] diff --git a/src/cloudflare/resources/alerting/destinations/pagerduty.py b/src/cloudflare/resources/alerting/destinations/pagerduty.py index 093dbb88fbf..b6e4f112a41 100644 --- a/src/cloudflare/resources/alerting/destinations/pagerduty.py +++ b/src/cloudflare/resources/alerting/destinations/pagerduty.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.alerting.destinations.pagerduty_get_response import PagerdutyGetResponse from ....types.alerting.destinations.pagerduty_link_response import PagerdutyLinkResponse from ....types.alerting.destinations.pagerduty_create_response import PagerdutyCreateResponse diff --git a/src/cloudflare/resources/alerting/destinations/webhooks.py b/src/cloudflare/resources/alerting/destinations/webhooks.py index 883d4890db8..038ec887425 100644 --- a/src/cloudflare/resources/alerting/destinations/webhooks.py +++ b/src/cloudflare/resources/alerting/destinations/webhooks.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.alerting.destinations import webhook_create_params, webhook_update_params from ....types.alerting.destinations.webhooks import Webhooks from ....types.alerting.destinations.webhook_create_response import WebhookCreateResponse diff --git a/src/cloudflare/resources/alerting/history.py b/src/cloudflare/resources/alerting/history.py index 9ddd67eb387..f36f2e6927e 100644 --- a/src/cloudflare/resources/alerting/history.py +++ b/src/cloudflare/resources/alerting/history.py @@ -18,10 +18,7 @@ async_to_streamed_response_wrapper, ) from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.alerting import history_list_params from ...types.alerting.history import History diff --git a/src/cloudflare/resources/alerting/policies.py b/src/cloudflare/resources/alerting/policies.py index b4c0c91442f..d951b329903 100644 --- a/src/cloudflare/resources/alerting/policies.py +++ b/src/cloudflare/resources/alerting/policies.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.alerting import policy_create_params, policy_update_params from ...types.alerting.policy import Policy from ...types.alerting.mechanism_param import MechanismParam diff --git a/src/cloudflare/resources/api_gateway/configurations.py b/src/cloudflare/resources/api_gateway/configurations.py index 4e02d4359d6..3d4aa7ba68a 100644 --- a/src/cloudflare/resources/api_gateway/configurations.py +++ b/src/cloudflare/resources/api_gateway/configurations.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.api_gateway import configuration_get_params, configuration_update_params from ...types.api_gateway.configuration import Configuration from ...types.api_gateway.configuration_update_response import ConfigurationUpdateResponse diff --git a/src/cloudflare/resources/api_gateway/discovery/discovery.py b/src/cloudflare/resources/api_gateway/discovery/discovery.py index f4aed13c07e..9decd5b422c 100644 --- a/src/cloudflare/resources/api_gateway/discovery/discovery.py +++ b/src/cloudflare/resources/api_gateway/discovery/discovery.py @@ -24,9 +24,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.api_gateway.discovery_get_response import DiscoveryGetResponse __all__ = ["DiscoveryResource", "AsyncDiscoveryResource"] diff --git a/src/cloudflare/resources/api_gateway/discovery/operations.py b/src/cloudflare/resources/api_gateway/discovery/operations.py index d893457fcdb..03fb113abb0 100644 --- a/src/cloudflare/resources/api_gateway/discovery/operations.py +++ b/src/cloudflare/resources/api_gateway/discovery/operations.py @@ -22,10 +22,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.api_gateway.discovery import operation_edit_params, operation_list_params from ....types.api_gateway.discovery_operation import DiscoveryOperation from ....types.api_gateway.discovery.operation_edit_response import OperationEditResponse diff --git a/src/cloudflare/resources/api_gateway/operations/operations.py b/src/cloudflare/resources/api_gateway/operations/operations.py index 90c7b6dd975..f0737a85bf5 100644 --- a/src/cloudflare/resources/api_gateway/operations/operations.py +++ b/src/cloudflare/resources/api_gateway/operations/operations.py @@ -22,10 +22,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from .schema_validation import ( SchemaValidationResource, AsyncSchemaValidationResource, diff --git a/src/cloudflare/resources/api_gateway/operations/schema_validation.py b/src/cloudflare/resources/api_gateway/operations/schema_validation.py index b8bd7a0cdcb..5b86343cfd6 100644 --- a/src/cloudflare/resources/api_gateway/operations/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/operations/schema_validation.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.api_gateway.operations import ( SettingsMultipleRequest, schema_validation_edit_params, diff --git a/src/cloudflare/resources/api_gateway/schemas.py b/src/cloudflare/resources/api_gateway/schemas.py index d2d1976f847..501680e88a3 100644 --- a/src/cloudflare/resources/api_gateway/schemas.py +++ b/src/cloudflare/resources/api_gateway/schemas.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.api_gateway import schema_list_params from ...types.api_gateway.schema_list_response import SchemaListResponse diff --git a/src/cloudflare/resources/api_gateway/settings/schema_validation.py b/src/cloudflare/resources/api_gateway/settings/schema_validation.py index 74acb51c4a5..edfbacc9040 100644 --- a/src/cloudflare/resources/api_gateway/settings/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/settings/schema_validation.py @@ -20,9 +20,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.api_gateway.settings import schema_validation_edit_params, schema_validation_update_params from ....types.api_gateway.settings.settings import Settings diff --git a/src/cloudflare/resources/api_gateway/user_schemas/operations.py b/src/cloudflare/resources/api_gateway/user_schemas/operations.py index 171f80b2aef..783e7f5e5cd 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/operations.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/operations.py @@ -18,10 +18,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.api_gateway.user_schemas import operation_list_params from ....types.api_gateway.user_schemas.operation_list_response import OperationListResponse diff --git a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py index 82510dc75c2..a2f21d53add 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py @@ -32,10 +32,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.api_gateway import ( user_schema_get_params, user_schema_edit_params, diff --git a/src/cloudflare/resources/argo/smart_routing.py b/src/cloudflare/resources/argo/smart_routing.py index 76b1e889a14..66076b40903 100644 --- a/src/cloudflare/resources/argo/smart_routing.py +++ b/src/cloudflare/resources/argo/smart_routing.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.argo import smart_routing_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.argo.smart_routing_get_response import SmartRoutingGetResponse from ...types.argo.smart_routing_edit_response import SmartRoutingEditResponse diff --git a/src/cloudflare/resources/argo/tiered_caching.py b/src/cloudflare/resources/argo/tiered_caching.py index 978bfc9d2c0..d11257e0a6c 100644 --- a/src/cloudflare/resources/argo/tiered_caching.py +++ b/src/cloudflare/resources/argo/tiered_caching.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.argo import tiered_caching_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.argo.tiered_caching_get_response import TieredCachingGetResponse from ...types.argo.tiered_caching_edit_response import TieredCachingEditResponse diff --git a/src/cloudflare/resources/audit_logs.py b/src/cloudflare/resources/audit_logs.py index 2d8cd11c4ba..5958b8541e7 100644 --- a/src/cloudflare/resources/audit_logs.py +++ b/src/cloudflare/resources/audit_logs.py @@ -19,10 +19,7 @@ async_to_streamed_response_wrapper, ) from ..pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.audit_logs import audit_log_list_params from ..types.shared.audit_log import AuditLog diff --git a/src/cloudflare/resources/billing/profiles.py b/src/cloudflare/resources/billing/profiles.py index 011916b05ba..4ee42cdb407 100644 --- a/src/cloudflare/resources/billing/profiles.py +++ b/src/cloudflare/resources/billing/profiles.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.billing.profile_get_response import ProfileGetResponse __all__ = ["ProfilesResource", "AsyncProfilesResource"] diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py index d1ee986475a..d0974c04dc4 100644 --- a/src/cloudflare/resources/bot_management.py +++ b/src/cloudflare/resources/bot_management.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.bot_management import bot_management_update_params from ..types.bot_management.bot_management_get_response import BotManagementGetResponse from ..types.bot_management.bot_management_update_response import BotManagementUpdateResponse diff --git a/src/cloudflare/resources/brand_protection.py b/src/cloudflare/resources/brand_protection.py index f23dee3648c..ce9193d61eb 100644 --- a/src/cloudflare/resources/brand_protection.py +++ b/src/cloudflare/resources/brand_protection.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.brand_protection import brand_protection_submit_params, brand_protection_url_info_params from ..types.brand_protection.info import Info from ..types.brand_protection.submit import Submit diff --git a/src/cloudflare/resources/cache/cache.py b/src/cloudflare/resources/cache/cache.py index 0b6fc0dd540..ad1bbcf2b6a 100644 --- a/src/cloudflare/resources/cache/cache.py +++ b/src/cloudflare/resources/cache/cache.py @@ -38,9 +38,7 @@ CacheReserveResourceWithStreamingResponse, AsyncCacheReserveResourceWithStreamingResponse, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from .smart_tiered_cache import ( SmartTieredCacheResource, AsyncSmartTieredCacheResource, diff --git a/src/cloudflare/resources/cache/cache_reserve.py b/src/cloudflare/resources/cache/cache_reserve.py index 8a249b50a0a..ad27c95386f 100644 --- a/src/cloudflare/resources/cache/cache_reserve.py +++ b/src/cloudflare/resources/cache/cache_reserve.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.cache import cache_reserve_edit_params, cache_reserve_clear_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.cache.cache_reserve_get_response import CacheReserveGetResponse from ...types.cache.cache_reserve_edit_response import CacheReserveEditResponse from ...types.cache.cache_reserve_clear_response import CacheReserveClearResponse diff --git a/src/cloudflare/resources/cache/regional_tiered_cache.py b/src/cloudflare/resources/cache/regional_tiered_cache.py index 4ccfd7c49cc..ad130a1e6a3 100644 --- a/src/cloudflare/resources/cache/regional_tiered_cache.py +++ b/src/cloudflare/resources/cache/regional_tiered_cache.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.cache import regional_tiered_cache_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.cache.regional_tiered_cache_get_response import RegionalTieredCacheGetResponse from ...types.cache.regional_tiered_cache_edit_response import RegionalTieredCacheEditResponse diff --git a/src/cloudflare/resources/cache/smart_tiered_cache.py b/src/cloudflare/resources/cache/smart_tiered_cache.py index 28189fb0fe5..44e94e58319 100644 --- a/src/cloudflare/resources/cache/smart_tiered_cache.py +++ b/src/cloudflare/resources/cache/smart_tiered_cache.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.cache import smart_tiered_cache_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.cache.smart_tiered_cache_get_response import SmartTieredCacheGetResponse from ...types.cache.smart_tiered_cache_edit_response import SmartTieredCacheEditResponse from ...types.cache.smart_tiered_cache_delete_response import SmartTieredCacheDeleteResponse diff --git a/src/cloudflare/resources/cache/variants.py b/src/cloudflare/resources/cache/variants.py index 3c7f760c774..bf705271620 100644 --- a/src/cloudflare/resources/cache/variants.py +++ b/src/cloudflare/resources/cache/variants.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.cache import variant_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.cache.cache_variant import CacheVariant from ...types.cache.variant_get_response import VariantGetResponse from ...types.cache.variant_edit_response import VariantEditResponse diff --git a/src/cloudflare/resources/calls/calls.py b/src/cloudflare/resources/calls/calls.py index 17455714979..2e6a89aaf41 100644 --- a/src/cloudflare/resources/calls/calls.py +++ b/src/cloudflare/resources/calls/calls.py @@ -31,10 +31,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.calls import call_create_params, call_update_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.calls.calls_app import CallsApp from ...types.calls.call_list_response import CallListResponse from ...types.calls.calls_app_with_secret import CallsAppWithSecret diff --git a/src/cloudflare/resources/calls/turn/keys.py b/src/cloudflare/resources/calls/turn/keys.py index f87b1c8c6f4..bd7dd6712bd 100644 --- a/src/cloudflare/resources/calls/turn/keys.py +++ b/src/cloudflare/resources/calls/turn/keys.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.calls.turn import key_create_params, key_update_params from ....types.calls.turn.key_get_response import KeyGetResponse from ....types.calls.turn.key_list_response import KeyListResponse diff --git a/src/cloudflare/resources/certificate_authorities/hostname_associations.py b/src/cloudflare/resources/certificate_authorities/hostname_associations.py index 4867abd374d..486b397704e 100644 --- a/src/cloudflare/resources/certificate_authorities/hostname_associations.py +++ b/src/cloudflare/resources/certificate_authorities/hostname_associations.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.certificate_authorities import hostname_association_get_params, hostname_association_update_params from ...types.certificate_authorities.hostname_association import HostnameAssociation from ...types.certificate_authorities.hostname_association_get_response import HostnameAssociationGetResponse diff --git a/src/cloudflare/resources/challenges/widgets.py b/src/cloudflare/resources/challenges/widgets.py index 89830325d3c..95cf49944dc 100644 --- a/src/cloudflare/resources/challenges/widgets.py +++ b/src/cloudflare/resources/challenges/widgets.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.challenges import ( widget_list_params, widget_create_params, diff --git a/src/cloudflare/resources/client_certificates.py b/src/cloudflare/resources/client_certificates.py index f8a069fc5a7..238739406c6 100644 --- a/src/cloudflare/resources/client_certificates.py +++ b/src/cloudflare/resources/client_certificates.py @@ -22,10 +22,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.client_certificates import client_certificate_list_params, client_certificate_create_params from ..types.client_certificates.client_certificate import ClientCertificate diff --git a/src/cloudflare/resources/cloudforce_one/requests/message.py b/src/cloudflare/resources/cloudforce_one/requests/message.py index 177e2c5b099..84388261101 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/message.py +++ b/src/cloudflare/resources/cloudforce_one/requests/message.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.cloudforce_one.requests import message_get_params, message_create_params, message_update_params from ....types.cloudforce_one.requests.message import Message from ....types.cloudforce_one.requests.message_get_response import MessageGetResponse diff --git a/src/cloudflare/resources/cloudforce_one/requests/priority.py b/src/cloudflare/resources/cloudforce_one/requests/priority.py index 243e43f789b..956da5319ea 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/priority.py +++ b/src/cloudflare/resources/cloudforce_one/requests/priority.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.cloudforce_one.item import Item from ....types.cloudforce_one.quota import Quota from ....types.cloudforce_one.requests import priority_create_params, priority_update_params diff --git a/src/cloudflare/resources/cloudforce_one/requests/requests.py b/src/cloudflare/resources/cloudforce_one/requests/requests.py index 267e04595d6..8d16022f5e3 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/requests.py +++ b/src/cloudflare/resources/cloudforce_one/requests/requests.py @@ -39,10 +39,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.cloudforce_one import request_list_params, request_create_params, request_update_params from ....types.cloudforce_one.item import Item from ....types.cloudforce_one.quota import Quota diff --git a/src/cloudflare/resources/custom_certificates/custom_certificates.py b/src/cloudflare/resources/custom_certificates/custom_certificates.py index a3deb798257..2dc84158685 100644 --- a/src/cloudflare/resources/custom_certificates/custom_certificates.py +++ b/src/cloudflare/resources/custom_certificates/custom_certificates.py @@ -30,10 +30,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.custom_hostnames import BundleMethod from ...types.custom_certificates import ( custom_certificate_edit_params, diff --git a/src/cloudflare/resources/custom_certificates/prioritize.py b/src/cloudflare/resources/custom_certificates/prioritize.py index 1b4813ec49d..c16c625fb77 100644 --- a/src/cloudflare/resources/custom_certificates/prioritize.py +++ b/src/cloudflare/resources/custom_certificates/prioritize.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.custom_certificates import prioritize_update_params from ...types.custom_certificates.prioritize_update_response import PrioritizeUpdateResponse diff --git a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py index 8ed92ce708f..64f36eb8d6e 100644 --- a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py +++ b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .fallback_origin import ( FallbackOriginResource, AsyncFallbackOriginResource, diff --git a/src/cloudflare/resources/custom_hostnames/fallback_origin.py b/src/cloudflare/resources/custom_hostnames/fallback_origin.py index 8ca189ddf97..cfaf566b272 100644 --- a/src/cloudflare/resources/custom_hostnames/fallback_origin.py +++ b/src/cloudflare/resources/custom_hostnames/fallback_origin.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.custom_hostnames import fallback_origin_update_params from ...types.custom_hostnames.fallback_origin_get_response import FallbackOriginGetResponse from ...types.custom_hostnames.fallback_origin_delete_response import FallbackOriginDeleteResponse diff --git a/src/cloudflare/resources/custom_nameservers.py b/src/cloudflare/resources/custom_nameservers.py index e0aa1a8fee7..29c581ade49 100644 --- a/src/cloudflare/resources/custom_nameservers.py +++ b/src/cloudflare/resources/custom_nameservers.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.custom_nameservers import custom_nameserver_create_params from ..types.custom_nameservers.custom_nameserver import CustomNameserver from ..types.custom_nameservers.custom_nameserver_get_response import CustomNameserverGetResponse diff --git a/src/cloudflare/resources/d1/database.py b/src/cloudflare/resources/d1/database.py index d4b4ca58763..7223084588d 100644 --- a/src/cloudflare/resources/d1/database.py +++ b/src/cloudflare/resources/d1/database.py @@ -23,10 +23,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...types.d1.d1 import D1 -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.d1.database_raw_response import DatabaseRawResponse from ...types.d1.database_list_response import DatabaseListResponse from ...types.d1.database_query_response import DatabaseQueryResponse diff --git a/src/cloudflare/resources/dcv_delegation.py b/src/cloudflare/resources/dcv_delegation.py index 18aa2d28f43..127c13a15c5 100644 --- a/src/cloudflare/resources/dcv_delegation.py +++ b/src/cloudflare/resources/dcv_delegation.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.dcv_delegation.dcv_delegation_uuid import DCVDelegationUUID __all__ = ["DCVDelegationResource", "AsyncDCVDelegationResource"] diff --git a/src/cloudflare/resources/diagnostics/traceroutes.py b/src/cloudflare/resources/diagnostics/traceroutes.py index 78ec1ca7d88..61741357995 100644 --- a/src/cloudflare/resources/diagnostics/traceroutes.py +++ b/src/cloudflare/resources/diagnostics/traceroutes.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.diagnostics import traceroute_create_params from ...types.diagnostics.traceroute_create_response import TracerouteCreateResponse diff --git a/src/cloudflare/resources/dns/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/analytics/reports/bytimes.py index 18e924c6fb2..2832c5b6782 100644 --- a/src/cloudflare/resources/dns/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/analytics/reports/bytimes.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.dns.firewall import Delta from .....types.dns.firewall.delta import Delta from .....types.dns.analytics.reports import bytime_get_params diff --git a/src/cloudflare/resources/dns/analytics/reports/reports.py b/src/cloudflare/resources/dns/analytics/reports/reports.py index 7649e01724f..6faf0eead08 100644 --- a/src/cloudflare/resources/dns/analytics/reports/reports.py +++ b/src/cloudflare/resources/dns/analytics/reports/reports.py @@ -29,9 +29,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.dns.analytics import report_get_params from .....types.dns.analytics.report import Report diff --git a/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py index de7eb9723da..f11dd11b4ad 100644 --- a/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.dns.firewall import Delta from ......types.dns.firewall.delta import Delta from ......types.dns.analytics.reports.by_time import ByTime diff --git a/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py b/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py index 09693f73830..387bdb32beb 100644 --- a/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py +++ b/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py @@ -29,9 +29,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.dns.analytics.report import Report from ......types.dns.firewall.analytics import report_get_params diff --git a/src/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py index 7bfa583769e..550d2bab98b 100644 --- a/src/cloudflare/resources/dns/firewall/firewall.py +++ b/src/cloudflare/resources/dns/firewall/firewall.py @@ -30,10 +30,7 @@ from ...._wrappers import ResultWrapper from ....types.dns import firewall_edit_params, firewall_list_params, firewall_create_params from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from .analytics.analytics import AnalyticsResource, AsyncAnalyticsResource from ....types.dns.firewall.firewall import Firewall from ....types.dns.firewall_ips_param import FirewallIPsParam diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index 2f1defd119f..feb3b54b6e5 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -31,10 +31,7 @@ record_update_params, ) from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.dns.record import Record from ...types.dns.ttl_param import TTLParam from ...types.dns.record_tags import RecordTags diff --git a/src/cloudflare/resources/dns/settings.py b/src/cloudflare/resources/dns/settings.py index 635b4b77250..097801053cc 100644 --- a/src/cloudflare/resources/dns/settings.py +++ b/src/cloudflare/resources/dns/settings.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.dns import setting_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.dns.dns_setting_param import DNSSettingParam from ...types.dns.setting_get_response import SettingGetResponse from ...types.dns.setting_edit_response import SettingEditResponse diff --git a/src/cloudflare/resources/dnssec.py b/src/cloudflare/resources/dnssec.py index 54a5ec093ab..577e7edfcf0 100644 --- a/src/cloudflare/resources/dnssec.py +++ b/src/cloudflare/resources/dnssec.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.dnssec import dnssec_edit_params from ..types.dnssec.dnssec import DNSSEC from ..types.dnssec.dnssec_delete_response import DNSSECDeleteResponse diff --git a/src/cloudflare/resources/durable_objects/namespaces/namespaces.py b/src/cloudflare/resources/durable_objects/namespaces/namespaces.py index 7c8870332a3..c663cfe151a 100644 --- a/src/cloudflare/resources/durable_objects/namespaces/namespaces.py +++ b/src/cloudflare/resources/durable_objects/namespaces/namespaces.py @@ -22,10 +22,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.durable_objects.namespace import Namespace __all__ = ["NamespacesResource", "AsyncNamespacesResource"] diff --git a/src/cloudflare/resources/durable_objects/namespaces/objects.py b/src/cloudflare/resources/durable_objects/namespaces/objects.py index 0c05a216f24..8203cafb04c 100644 --- a/src/cloudflare/resources/durable_objects/namespaces/objects.py +++ b/src/cloudflare/resources/durable_objects/namespaces/objects.py @@ -15,10 +15,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncCursorLimitPagination, AsyncCursorLimitPagination -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.durable_objects.namespaces import object_list_params from ....types.durable_objects.namespaces.durable_object import DurableObject diff --git a/src/cloudflare/resources/email_routing/addresses.py b/src/cloudflare/resources/email_routing/addresses.py index 2ee58159aa2..24d0ccf8fee 100644 --- a/src/cloudflare/resources/email_routing/addresses.py +++ b/src/cloudflare/resources/email_routing/addresses.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.email_routing import address_list_params, address_create_params from ...types.email_routing.address import Address diff --git a/src/cloudflare/resources/email_routing/dns.py b/src/cloudflare/resources/email_routing/dns.py index 7e438437227..52ed8de53e3 100644 --- a/src/cloudflare/resources/email_routing/dns.py +++ b/src/cloudflare/resources/email_routing/dns.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.email_routing.dns_get_response import DNSGetResponse __all__ = ["DNSResource", "AsyncDNSResource"] diff --git a/src/cloudflare/resources/email_routing/email_routing.py b/src/cloudflare/resources/email_routing/email_routing.py index 52ff5a1758d..a784226f1f4 100644 --- a/src/cloudflare/resources/email_routing/email_routing.py +++ b/src/cloudflare/resources/email_routing/email_routing.py @@ -45,9 +45,7 @@ ) from ..._wrappers import ResultWrapper from .rules.rules import RulesResource, AsyncRulesResource -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.email_routing import email_routing_enable_params, email_routing_disable_params from ...types.email_routing.settings import Settings diff --git a/src/cloudflare/resources/email_routing/rules/catch_alls.py b/src/cloudflare/resources/email_routing/rules/catch_alls.py index 567104c8c91..14135aadea5 100644 --- a/src/cloudflare/resources/email_routing/rules/catch_alls.py +++ b/src/cloudflare/resources/email_routing/rules/catch_alls.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.email_routing.rules import catch_all_update_params from ....types.email_routing.rules.catch_all_action_param import CatchAllActionParam from ....types.email_routing.rules.catch_all_get_response import CatchAllGetResponse diff --git a/src/cloudflare/resources/email_routing/rules/rules.py b/src/cloudflare/resources/email_routing/rules/rules.py index d38f48dfc4a..520f6cd4641 100644 --- a/src/cloudflare/resources/email_routing/rules/rules.py +++ b/src/cloudflare/resources/email_routing/rules/rules.py @@ -30,10 +30,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.email_routing import rule_list_params, rule_create_params, rule_update_params from ....types.email_routing.action_param import ActionParam from ....types.email_routing.matcher_param import MatcherParam diff --git a/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py b/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py index b4c80577222..c1c541c1d96 100644 --- a/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py +++ b/src/cloudflare/resources/event_notifications/r2/configuration/configuration.py @@ -24,9 +24,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.event_notifications.r2.configuration_get_response import ConfigurationGetResponse __all__ = ["ConfigurationResource", "AsyncConfigurationResource"] diff --git a/src/cloudflare/resources/event_notifications/r2/configuration/queues.py b/src/cloudflare/resources/event_notifications/r2/configuration/queues.py index cee65c5ac89..6b4d28e5383 100644 --- a/src/cloudflare/resources/event_notifications/r2/configuration/queues.py +++ b/src/cloudflare/resources/event_notifications/r2/configuration/queues.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.event_notifications.r2.configuration import queue_update_params from .....types.event_notifications.r2.configuration.queue_delete_response import QueueDeleteResponse from .....types.event_notifications.r2.configuration.queue_update_response import QueueUpdateResponse diff --git a/src/cloudflare/resources/filters.py b/src/cloudflare/resources/filters.py index 7c71132b273..ce71f975685 100644 --- a/src/cloudflare/resources/filters.py +++ b/src/cloudflare/resources/filters.py @@ -22,10 +22,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.filters import filter_list_params, filter_create_params, filter_update_params from ..types.filters.firewall_filter import FirewallFilter from ..types.filters.filter_create_response import FilterCreateResponse diff --git a/src/cloudflare/resources/firewall/access_rules.py b/src/cloudflare/resources/firewall/access_rules.py index 3fac39c90ce..80afe6dd910 100644 --- a/src/cloudflare/resources/firewall/access_rules.py +++ b/src/cloudflare/resources/firewall/access_rules.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.firewall import access_rule_edit_params, access_rule_list_params, access_rule_create_params from ...types.firewall.access_rule_get_response import AccessRuleGetResponse from ...types.firewall.access_rule_edit_response import AccessRuleEditResponse diff --git a/src/cloudflare/resources/firewall/lockdowns.py b/src/cloudflare/resources/firewall/lockdowns.py index da3be5c7fc9..52479f92639 100644 --- a/src/cloudflare/resources/firewall/lockdowns.py +++ b/src/cloudflare/resources/firewall/lockdowns.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.firewall import lockdown_list_params, lockdown_create_params, lockdown_update_params from ...types.firewall.lockdown import Lockdown from ...types.firewall.lockdown_delete_response import LockdownDeleteResponse diff --git a/src/cloudflare/resources/firewall/rules.py b/src/cloudflare/resources/firewall/rules.py index 8e58114ac84..7eb3973dc9f 100644 --- a/src/cloudflare/resources/firewall/rules.py +++ b/src/cloudflare/resources/firewall/rules.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.firewall import ( rule_get_params, rule_edit_params, diff --git a/src/cloudflare/resources/firewall/ua_rules.py b/src/cloudflare/resources/firewall/ua_rules.py index 4da2caa2b8e..3aec71bcbda 100644 --- a/src/cloudflare/resources/firewall/ua_rules.py +++ b/src/cloudflare/resources/firewall/ua_rules.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.firewall import ua_rule_list_params, ua_rule_create_params, ua_rule_update_params from ...types.firewall.ua_rule_get_response import UARuleGetResponse from ...types.firewall.ua_rule_list_response import UARuleListResponse diff --git a/src/cloudflare/resources/firewall/waf/overrides.py b/src/cloudflare/resources/firewall/waf/overrides.py index 682e482964f..0562584da76 100644 --- a/src/cloudflare/resources/firewall/waf/overrides.py +++ b/src/cloudflare/resources/firewall/waf/overrides.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.firewall.waf import override_list_params, override_create_params, override_update_params from ....types.firewall.waf.override import Override from ....types.firewall.waf.override_delete_response import OverrideDeleteResponse diff --git a/src/cloudflare/resources/firewall/waf/packages/groups.py b/src/cloudflare/resources/firewall/waf/packages/groups.py index efd106d5cec..a3835297072 100644 --- a/src/cloudflare/resources/firewall/waf/packages/groups.py +++ b/src/cloudflare/resources/firewall/waf/packages/groups.py @@ -22,10 +22,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.firewall.waf.packages import group_edit_params, group_list_params from .....types.firewall.waf.packages.group import Group from .....types.firewall.waf.packages.group_get_response import GroupGetResponse diff --git a/src/cloudflare/resources/firewall/waf/packages/packages.py b/src/cloudflare/resources/firewall/waf/packages/packages.py index bf8c365887e..b4d5b62323a 100644 --- a/src/cloudflare/resources/firewall/waf/packages/packages.py +++ b/src/cloudflare/resources/firewall/waf/packages/packages.py @@ -34,10 +34,7 @@ async_to_streamed_response_wrapper, ) from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.firewall.waf import package_list_params from .....types.firewall.waf.package_get_response import PackageGetResponse from .....types.firewall.waf.package_list_response import PackageListResponse diff --git a/src/cloudflare/resources/firewall/waf/packages/rules.py b/src/cloudflare/resources/firewall/waf/packages/rules.py index 7a1f92a3ede..697ce9315d8 100644 --- a/src/cloudflare/resources/firewall/waf/packages/rules.py +++ b/src/cloudflare/resources/firewall/waf/packages/rules.py @@ -22,10 +22,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.firewall.waf.packages import rule_edit_params, rule_list_params from .....types.firewall.waf.packages.rule_get_response import RuleGetResponse from .....types.firewall.waf.packages.rule_edit_response import RuleEditResponse diff --git a/src/cloudflare/resources/healthchecks/healthchecks.py b/src/cloudflare/resources/healthchecks/healthchecks.py index 8120a2f6944..7097e46f114 100644 --- a/src/cloudflare/resources/healthchecks/healthchecks.py +++ b/src/cloudflare/resources/healthchecks/healthchecks.py @@ -29,10 +29,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.healthchecks import ( healthcheck_edit_params, healthcheck_list_params, diff --git a/src/cloudflare/resources/healthchecks/previews.py b/src/cloudflare/resources/healthchecks/previews.py index c15f4667368..d6593156765 100644 --- a/src/cloudflare/resources/healthchecks/previews.py +++ b/src/cloudflare/resources/healthchecks/previews.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.healthchecks import preview_create_params from ...types.healthchecks.healthcheck import Healthcheck from ...types.healthchecks.check_region import CheckRegion diff --git a/src/cloudflare/resources/hostnames/settings/tls.py b/src/cloudflare/resources/hostnames/settings/tls.py index 03e541fc6e2..32cf20e4ec3 100644 --- a/src/cloudflare/resources/hostnames/settings/tls.py +++ b/src/cloudflare/resources/hostnames/settings/tls.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.hostnames.settings import tls_update_params from ....types.hostnames.settings.setting import Setting from ....types.hostnames.settings.tls_get_response import TLSGetResponse diff --git a/src/cloudflare/resources/hyperdrive/configs.py b/src/cloudflare/resources/hyperdrive/configs.py index 66f94ebdeec..47c9a7cd72a 100644 --- a/src/cloudflare/resources/hyperdrive/configs.py +++ b/src/cloudflare/resources/hyperdrive/configs.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.hyperdrive import config_edit_params, config_create_params, config_update_params from ...types.hyperdrive.hyperdrive import Hyperdrive from ...types.hyperdrive.configuration_param import ConfigurationParam diff --git a/src/cloudflare/resources/iam/permission_groups.py b/src/cloudflare/resources/iam/permission_groups.py index 1bb7effc98d..a73299d11ad 100644 --- a/src/cloudflare/resources/iam/permission_groups.py +++ b/src/cloudflare/resources/iam/permission_groups.py @@ -16,10 +16,7 @@ ) from ...types.iam import permission_group_list_params from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.iam.permission_group_get_response import PermissionGroupGetResponse __all__ = ["PermissionGroupsResource", "AsyncPermissionGroupsResource"] diff --git a/src/cloudflare/resources/iam/resource_groups.py b/src/cloudflare/resources/iam/resource_groups.py index 9d524bcea8e..d31ccfb2bd4 100644 --- a/src/cloudflare/resources/iam/resource_groups.py +++ b/src/cloudflare/resources/iam/resource_groups.py @@ -22,10 +22,7 @@ from ..._wrappers import ResultWrapper from ...types.iam import resource_group_list_params, resource_group_create_params, resource_group_update_params from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.iam.resource_group_get_response import ResourceGroupGetResponse from ...types.iam.resource_group_create_response import ResourceGroupCreateResponse from ...types.iam.resource_group_delete_response import ResourceGroupDeleteResponse diff --git a/src/cloudflare/resources/images/v1/blobs.py b/src/cloudflare/resources/images/v1/blobs.py index 4a4dec6571c..d8e492724aa 100644 --- a/src/cloudflare/resources/images/v1/blobs.py +++ b/src/cloudflare/resources/images/v1/blobs.py @@ -17,9 +17,7 @@ async_to_custom_raw_response_wrapper, async_to_custom_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options __all__ = ["BlobsResource", "AsyncBlobsResource"] diff --git a/src/cloudflare/resources/images/v1/keys.py b/src/cloudflare/resources/images/v1/keys.py index 96ff163104a..fb2704fbcf5 100644 --- a/src/cloudflare/resources/images/v1/keys.py +++ b/src/cloudflare/resources/images/v1/keys.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.images.v1.key_list_response import KeyListResponse from ....types.images.v1.key_delete_response import KeyDeleteResponse from ....types.images.v1.key_update_response import KeyUpdateResponse diff --git a/src/cloudflare/resources/images/v1/stats.py b/src/cloudflare/resources/images/v1/stats.py index f67fea164a7..bff97af42d4 100644 --- a/src/cloudflare/resources/images/v1/stats.py +++ b/src/cloudflare/resources/images/v1/stats.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.images.v1.stat import Stat __all__ = ["StatsResource", "AsyncStatsResource"] diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index 43cd026fcb5..094a8bb7375 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -53,10 +53,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePagination, AsyncV4PagePagination -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.images import v1_edit_params, v1_list_params, v1_create_params from ....types.images.image import Image from ....types.images.v1_list_response import V1ListResponse diff --git a/src/cloudflare/resources/images/v1/variants.py b/src/cloudflare/resources/images/v1/variants.py index f8572736699..e81e9a49cd2 100644 --- a/src/cloudflare/resources/images/v1/variants.py +++ b/src/cloudflare/resources/images/v1/variants.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.images.v1 import variant_edit_params, variant_create_params from ....types.images.v1.variant import Variant from ....types.images.v1.variant_get_response import VariantGetResponse diff --git a/src/cloudflare/resources/images/v2/direct_uploads.py b/src/cloudflare/resources/images/v2/direct_uploads.py index 19b44f66b1e..85950b687e7 100644 --- a/src/cloudflare/resources/images/v2/direct_uploads.py +++ b/src/cloudflare/resources/images/v2/direct_uploads.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.images.v2 import direct_upload_create_params from ....types.images.v2.direct_upload_create_response import DirectUploadCreateResponse diff --git a/src/cloudflare/resources/images/v2/v2.py b/src/cloudflare/resources/images/v2/v2.py index b683506e828..2aba0656813 100644 --- a/src/cloudflare/resources/images/v2/v2.py +++ b/src/cloudflare/resources/images/v2/v2.py @@ -29,9 +29,7 @@ DirectUploadsResourceWithStreamingResponse, AsyncDirectUploadsResourceWithStreamingResponse, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.images import v2_list_params from ....types.images.v2_list_response import V2ListResponse diff --git a/src/cloudflare/resources/intel/asn/asn.py b/src/cloudflare/resources/intel/asn/asn.py index 97ac5cb12f8..d8084c9b2c8 100644 --- a/src/cloudflare/resources/intel/asn/asn.py +++ b/src/cloudflare/resources/intel/asn/asn.py @@ -24,9 +24,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.shared.asn import ASN __all__ = ["ASNResource", "AsyncASNResource"] diff --git a/src/cloudflare/resources/intel/asn/subnets.py b/src/cloudflare/resources/intel/asn/subnets.py index 20fc57dcf63..0bc5182e2bf 100644 --- a/src/cloudflare/resources/intel/asn/subnets.py +++ b/src/cloudflare/resources/intel/asn/subnets.py @@ -13,9 +13,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.shared.asn import ASN from ....types.intel.asn.subnet_get_response import SubnetGetResponse diff --git a/src/cloudflare/resources/intel/attack_surface_report/issue_types.py b/src/cloudflare/resources/intel/attack_surface_report/issue_types.py index 1ddbe050a27..c29c09235d0 100644 --- a/src/cloudflare/resources/intel/attack_surface_report/issue_types.py +++ b/src/cloudflare/resources/intel/attack_surface_report/issue_types.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.intel.attack_surface_report.issue_type_get_response import IssueTypeGetResponse __all__ = ["IssueTypesResource", "AsyncIssueTypesResource"] diff --git a/src/cloudflare/resources/intel/attack_surface_report/issues.py b/src/cloudflare/resources/intel/attack_surface_report/issues.py index 9eb4457b40e..1045499937e 100644 --- a/src/cloudflare/resources/intel/attack_surface_report/issues.py +++ b/src/cloudflare/resources/intel/attack_surface_report/issues.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePagination, AsyncV4PagePagination -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.intel.attack_surface_report import ( issue_list_params, issue_type_params, diff --git a/src/cloudflare/resources/intel/dns.py b/src/cloudflare/resources/intel/dns.py index 7a5835921b8..94c5cc0f84f 100644 --- a/src/cloudflare/resources/intel/dns.py +++ b/src/cloudflare/resources/intel/dns.py @@ -16,10 +16,7 @@ ) from ...pagination import SyncV4PagePagination, AsyncV4PagePagination from ...types.intel import dns_list_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.intel.dns_list_response import DNSListResponse __all__ = ["DNSResource", "AsyncDNSResource"] diff --git a/src/cloudflare/resources/intel/domain_history.py b/src/cloudflare/resources/intel/domain_history.py index 01f977b3b72..819f4154b0f 100644 --- a/src/cloudflare/resources/intel/domain_history.py +++ b/src/cloudflare/resources/intel/domain_history.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.intel import domain_history_get_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.intel.domain_history_get_response import DomainHistoryGetResponse __all__ = ["DomainHistoryResource", "AsyncDomainHistoryResource"] diff --git a/src/cloudflare/resources/intel/domains/bulks.py b/src/cloudflare/resources/intel/domains/bulks.py index c8eb350e1ae..86a51260bd7 100644 --- a/src/cloudflare/resources/intel/domains/bulks.py +++ b/src/cloudflare/resources/intel/domains/bulks.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.intel.domains import bulk_get_params from ....types.intel.domains.bulk_get_response import BulkGetResponse diff --git a/src/cloudflare/resources/intel/domains/domains.py b/src/cloudflare/resources/intel/domains/domains.py index 81e9d09a452..18d75cbf4f4 100644 --- a/src/cloudflare/resources/intel/domains/domains.py +++ b/src/cloudflare/resources/intel/domains/domains.py @@ -29,9 +29,7 @@ ) from ...._wrappers import ResultWrapper from ....types.intel import domain_get_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.intel.domain import Domain __all__ = ["DomainsResource", "AsyncDomainsResource"] diff --git a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py index 59883527aab..06fe7ca7890 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py +++ b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py @@ -38,10 +38,7 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.intel import indicator_feed_create_params, indicator_feed_update_params -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.intel.indicator_feed_get_response import IndicatorFeedGetResponse from ....types.intel.indicator_feed_list_response import IndicatorFeedListResponse from ....types.intel.indicator_feed_create_response import IndicatorFeedCreateResponse diff --git a/src/cloudflare/resources/intel/indicator_feeds/permissions.py b/src/cloudflare/resources/intel/indicator_feeds/permissions.py index fe0f399ebdd..cba5e239a46 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/permissions.py +++ b/src/cloudflare/resources/intel/indicator_feeds/permissions.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.intel.indicator_feeds import permission_create_params, permission_delete_params from ....types.intel.indicator_feeds.permission_list_response import PermissionListResponse from ....types.intel.indicator_feeds.permission_create_response import PermissionCreateResponse diff --git a/src/cloudflare/resources/intel/indicator_feeds/snapshots.py b/src/cloudflare/resources/intel/indicator_feeds/snapshots.py index 3ee7cf376bc..b2e4466cc2e 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/snapshots.py +++ b/src/cloudflare/resources/intel/indicator_feeds/snapshots.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.intel.indicator_feeds import snapshot_update_params from ....types.intel.indicator_feeds.snapshot_update_response import SnapshotUpdateResponse diff --git a/src/cloudflare/resources/intel/ip_lists.py b/src/cloudflare/resources/intel/ip_lists.py index 78bb216c729..71a5e24ea72 100644 --- a/src/cloudflare/resources/intel/ip_lists.py +++ b/src/cloudflare/resources/intel/ip_lists.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.intel.ip_list_get_response import IPListGetResponse __all__ = ["IPListsResource", "AsyncIPListsResource"] diff --git a/src/cloudflare/resources/intel/ips.py b/src/cloudflare/resources/intel/ips.py index f205d9a9afd..b652e3a4898 100644 --- a/src/cloudflare/resources/intel/ips.py +++ b/src/cloudflare/resources/intel/ips.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.intel import ip_get_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.intel.ip_get_response import IPGetResponse __all__ = ["IPsResource", "AsyncIPsResource"] diff --git a/src/cloudflare/resources/intel/miscategorizations.py b/src/cloudflare/resources/intel/miscategorizations.py index bea63b18176..dfb119d4d40 100644 --- a/src/cloudflare/resources/intel/miscategorizations.py +++ b/src/cloudflare/resources/intel/miscategorizations.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.intel import miscategorization_create_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.intel.miscategorization_create_response import MiscategorizationCreateResponse __all__ = ["MiscategorizationsResource", "AsyncMiscategorizationsResource"] diff --git a/src/cloudflare/resources/intel/sinkholes.py b/src/cloudflare/resources/intel/sinkholes.py index 39757a98044..42afd8a78c0 100644 --- a/src/cloudflare/resources/intel/sinkholes.py +++ b/src/cloudflare/resources/intel/sinkholes.py @@ -14,10 +14,7 @@ async_to_streamed_response_wrapper, ) from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.intel.sinkhole import Sinkhole __all__ = ["SinkholesResource", "AsyncSinkholesResource"] diff --git a/src/cloudflare/resources/intel/whois.py b/src/cloudflare/resources/intel/whois.py index d8f2efe389c..ebef795bb02 100644 --- a/src/cloudflare/resources/intel/whois.py +++ b/src/cloudflare/resources/intel/whois.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.intel import whois_get_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.intel.whois_get_response import WhoisGetResponse __all__ = ["WhoisResource", "AsyncWhoisResource"] diff --git a/src/cloudflare/resources/ips.py b/src/cloudflare/resources/ips.py index c5d99f25d6b..9beb8f86528 100644 --- a/src/cloudflare/resources/ips.py +++ b/src/cloudflare/resources/ips.py @@ -21,9 +21,7 @@ ) from .._wrappers import ResultWrapper from ..types.ips import ip_list_params -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.ips.ip_list_response import IPListResponse __all__ = ["IPsResource", "AsyncIPsResource"] diff --git a/src/cloudflare/resources/keyless_certificates.py b/src/cloudflare/resources/keyless_certificates.py index 2d68350af29..8aec29d7a7d 100644 --- a/src/cloudflare/resources/keyless_certificates.py +++ b/src/cloudflare/resources/keyless_certificates.py @@ -21,10 +21,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncSinglePage, AsyncSinglePage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.custom_hostnames import BundleMethod from ..types.keyless_certificates import keyless_certificate_edit_params, keyless_certificate_create_params from ..types.custom_hostnames.bundle_method import BundleMethod diff --git a/src/cloudflare/resources/kv/namespaces/bulk.py b/src/cloudflare/resources/kv/namespaces/bulk.py index 7bc398ecfd9..6c9c6a7d1a7 100644 --- a/src/cloudflare/resources/kv/namespaces/bulk.py +++ b/src/cloudflare/resources/kv/namespaces/bulk.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.kv.namespaces import bulk_update_params from ....types.kv.namespaces.bulk_delete_response import BulkDeleteResponse from ....types.kv.namespaces.bulk_update_response import BulkUpdateResponse diff --git a/src/cloudflare/resources/kv/namespaces/keys.py b/src/cloudflare/resources/kv/namespaces/keys.py index 8d8c4ed3727..c61d663f9ba 100644 --- a/src/cloudflare/resources/kv/namespaces/keys.py +++ b/src/cloudflare/resources/kv/namespaces/keys.py @@ -15,10 +15,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncCursorLimitPagination, AsyncCursorLimitPagination -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.kv.namespaces import key_list_params from ....types.kv.namespaces.key import Key diff --git a/src/cloudflare/resources/kv/namespaces/metadata.py b/src/cloudflare/resources/kv/namespaces/metadata.py index 9112053105f..1aef3f0725d 100644 --- a/src/cloudflare/resources/kv/namespaces/metadata.py +++ b/src/cloudflare/resources/kv/namespaces/metadata.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.kv.namespaces.metadata_get_response import MetadataGetResponse __all__ = ["MetadataResource", "AsyncMetadataResource"] diff --git a/src/cloudflare/resources/kv/namespaces/namespaces.py b/src/cloudflare/resources/kv/namespaces/namespaces.py index be73605e215..6f82507c4e0 100644 --- a/src/cloudflare/resources/kv/namespaces/namespaces.py +++ b/src/cloudflare/resources/kv/namespaces/namespaces.py @@ -55,10 +55,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.kv.namespace import Namespace from ....types.kv.namespace_delete_response import NamespaceDeleteResponse from ....types.kv.namespace_update_response import NamespaceUpdateResponse diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py index d8b71b230d3..67c7e92f75d 100644 --- a/src/cloudflare/resources/kv/namespaces/values.py +++ b/src/cloudflare/resources/kv/namespaces/values.py @@ -28,9 +28,7 @@ async_to_custom_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.kv.namespaces import value_update_params from ....types.kv.namespaces.value_delete_response import ValueDeleteResponse from ....types.kv.namespaces.value_update_response import ValueUpdateResponse diff --git a/src/cloudflare/resources/load_balancers/load_balancers.py b/src/cloudflare/resources/load_balancers/load_balancers.py index 251ee8f97bb..5474bf9e565 100644 --- a/src/cloudflare/resources/load_balancers/load_balancers.py +++ b/src/cloudflare/resources/load_balancers/load_balancers.py @@ -62,10 +62,7 @@ from ..._wrappers import ResultWrapper from .pools.pools import PoolsResource, AsyncPoolsResource from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .monitors.monitors import MonitorsResource, AsyncMonitorsResource from ...types.load_balancers import ( SteeringPolicy, diff --git a/src/cloudflare/resources/load_balancers/monitors/monitors.py b/src/cloudflare/resources/load_balancers/monitors/monitors.py index d416ac7f341..ed24c10037a 100644 --- a/src/cloudflare/resources/load_balancers/monitors/monitors.py +++ b/src/cloudflare/resources/load_balancers/monitors/monitors.py @@ -38,10 +38,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.load_balancers import monitor_edit_params, monitor_create_params, monitor_update_params from ....types.load_balancers.monitor import Monitor from ....types.load_balancers.monitor_delete_response import MonitorDeleteResponse diff --git a/src/cloudflare/resources/load_balancers/monitors/previews.py b/src/cloudflare/resources/load_balancers/monitors/previews.py index df68da9f446..4de5c71cf24 100644 --- a/src/cloudflare/resources/load_balancers/monitors/previews.py +++ b/src/cloudflare/resources/load_balancers/monitors/previews.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.load_balancers.monitors import preview_create_params from ....types.load_balancers.monitors.preview_create_response import PreviewCreateResponse diff --git a/src/cloudflare/resources/load_balancers/monitors/references.py b/src/cloudflare/resources/load_balancers/monitors/references.py index d6a57962095..ef46a6ac365 100644 --- a/src/cloudflare/resources/load_balancers/monitors/references.py +++ b/src/cloudflare/resources/load_balancers/monitors/references.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.load_balancers.monitors.reference_get_response import ReferenceGetResponse __all__ = ["ReferencesResource", "AsyncReferencesResource"] diff --git a/src/cloudflare/resources/load_balancers/pools/health.py b/src/cloudflare/resources/load_balancers/pools/health.py index 9018456132c..0f583723a77 100644 --- a/src/cloudflare/resources/load_balancers/pools/health.py +++ b/src/cloudflare/resources/load_balancers/pools/health.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.load_balancers.pools import health_create_params from ....types.load_balancers.pools.health_get_response import HealthGetResponse from ....types.load_balancers.pools.health_create_response import HealthCreateResponse diff --git a/src/cloudflare/resources/load_balancers/pools/pools.py b/src/cloudflare/resources/load_balancers/pools/pools.py index 1652a3bed56..332d6f7146c 100644 --- a/src/cloudflare/resources/load_balancers/pools/pools.py +++ b/src/cloudflare/resources/load_balancers/pools/pools.py @@ -37,10 +37,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.load_balancers import ( pool_edit_params, pool_list_params, diff --git a/src/cloudflare/resources/load_balancers/pools/references.py b/src/cloudflare/resources/load_balancers/pools/references.py index a66b780bb96..6f75e55bb3e 100644 --- a/src/cloudflare/resources/load_balancers/pools/references.py +++ b/src/cloudflare/resources/load_balancers/pools/references.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.load_balancers.pools.reference_get_response import ReferenceGetResponse __all__ = ["ReferencesResource", "AsyncReferencesResource"] diff --git a/src/cloudflare/resources/load_balancers/previews.py b/src/cloudflare/resources/load_balancers/previews.py index 5014648be35..a444e682d3e 100644 --- a/src/cloudflare/resources/load_balancers/previews.py +++ b/src/cloudflare/resources/load_balancers/previews.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.load_balancers.preview_get_response import PreviewGetResponse __all__ = ["PreviewsResource", "AsyncPreviewsResource"] diff --git a/src/cloudflare/resources/load_balancers/regions.py b/src/cloudflare/resources/load_balancers/regions.py index 21ce3a8b4eb..38b0f38de4a 100644 --- a/src/cloudflare/resources/load_balancers/regions.py +++ b/src/cloudflare/resources/load_balancers/regions.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.load_balancers import region_list_params from ...types.load_balancers.region_get_response import RegionGetResponse from ...types.load_balancers.region_list_response import RegionListResponse diff --git a/src/cloudflare/resources/load_balancers/searches.py b/src/cloudflare/resources/load_balancers/searches.py index 5d52ce7aaec..c0e2eaf46c9 100644 --- a/src/cloudflare/resources/load_balancers/searches.py +++ b/src/cloudflare/resources/load_balancers/searches.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.load_balancers import search_get_params from ...types.load_balancers.search_get_response import SearchGetResponse diff --git a/src/cloudflare/resources/logpush/datasets/fields.py b/src/cloudflare/resources/logpush/datasets/fields.py index 611c0f0f15a..5e661edf514 100644 --- a/src/cloudflare/resources/logpush/datasets/fields.py +++ b/src/cloudflare/resources/logpush/datasets/fields.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options __all__ = ["FieldsResource", "AsyncFieldsResource"] diff --git a/src/cloudflare/resources/logpush/datasets/jobs.py b/src/cloudflare/resources/logpush/datasets/jobs.py index 4da84bf1027..f96da336d34 100644 --- a/src/cloudflare/resources/logpush/datasets/jobs.py +++ b/src/cloudflare/resources/logpush/datasets/jobs.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.logpush.datasets.job_get_response import JobGetResponse __all__ = ["JobsResource", "AsyncJobsResource"] diff --git a/src/cloudflare/resources/logpush/edge.py b/src/cloudflare/resources/logpush/edge.py index de3d6ff76e2..a708f47cfb3 100644 --- a/src/cloudflare/resources/logpush/edge.py +++ b/src/cloudflare/resources/logpush/edge.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.logpush import edge_create_params from ...types.logpush.edge_get_response import EdgeGetResponse from ...types.logpush.instant_logpush_job import InstantLogpushJob diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index b91faac731a..142476cb9a4 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.logpush import job_create_params, job_update_params from ...types.logpush.logpush_job import LogpushJob from ...types.logpush.output_options_param import OutputOptionsParam diff --git a/src/cloudflare/resources/logpush/ownership.py b/src/cloudflare/resources/logpush/ownership.py index 5498bb1f679..42cf9a9ab36 100644 --- a/src/cloudflare/resources/logpush/ownership.py +++ b/src/cloudflare/resources/logpush/ownership.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.logpush import ownership_create_params, ownership_validate_params from ...types.logpush.ownership_validation import OwnershipValidation from ...types.logpush.ownership_create_response import OwnershipCreateResponse diff --git a/src/cloudflare/resources/logpush/validate.py b/src/cloudflare/resources/logpush/validate.py index c334340392b..2de975b9580 100644 --- a/src/cloudflare/resources/logpush/validate.py +++ b/src/cloudflare/resources/logpush/validate.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.logpush import validate_origin_params, validate_destination_params from ...types.logpush.validate_origin_response import ValidateOriginResponse from ...types.logpush.validate_destination_response import ValidateDestinationResponse diff --git a/src/cloudflare/resources/logs/control/cmb/config.py b/src/cloudflare/resources/logs/control/cmb/config.py index b1c4353d078..ac19a9921c9 100644 --- a/src/cloudflare/resources/logs/control/cmb/config.py +++ b/src/cloudflare/resources/logs/control/cmb/config.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.logs.control.cmb import config_create_params from .....types.logs.control.cmb.cmb_config import CmbConfig diff --git a/src/cloudflare/resources/logs/control/retention.py b/src/cloudflare/resources/logs/control/retention.py index 2d468f2a73f..ad95003425b 100644 --- a/src/cloudflare/resources/logs/control/retention.py +++ b/src/cloudflare/resources/logs/control/retention.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.logs.control import retention_create_params from ....types.logs.control.retention_get_response import RetentionGetResponse from ....types.logs.control.retention_create_response import RetentionCreateResponse diff --git a/src/cloudflare/resources/logs/rayid.py b/src/cloudflare/resources/logs/rayid.py index d6cbefae0ee..2cc4d4c11dc 100644 --- a/src/cloudflare/resources/logs/rayid.py +++ b/src/cloudflare/resources/logs/rayid.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...types.logs import rayid_get_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.logs.rayid_get_response import RayIDGetResponse __all__ = ["RayIDResource", "AsyncRayIDResource"] diff --git a/src/cloudflare/resources/logs/received/fields.py b/src/cloudflare/resources/logs/received/fields.py index 18015412ab8..f8e041e7866 100644 --- a/src/cloudflare/resources/logs/received/fields.py +++ b/src/cloudflare/resources/logs/received/fields.py @@ -13,9 +13,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.logs.received.field_get_response import FieldGetResponse __all__ = ["FieldsResource", "AsyncFieldsResource"] diff --git a/src/cloudflare/resources/logs/received/received.py b/src/cloudflare/resources/logs/received/received.py index fe5ea8ffda1..ce56f1d3f04 100644 --- a/src/cloudflare/resources/logs/received/received.py +++ b/src/cloudflare/resources/logs/received/received.py @@ -29,9 +29,7 @@ async_to_streamed_response_wrapper, ) from ....types.logs import received_get_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.logs.received_get_response import ReceivedGetResponse __all__ = ["ReceivedResource", "AsyncReceivedResource"] diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py index c5588ee35fb..ea4fc1e11d7 100644 --- a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py +++ b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py @@ -28,9 +28,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.magic_network_monitoring import config_edit_params, config_create_params, config_update_params from ....types.magic_network_monitoring.configuration import Configuration diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/full.py b/src/cloudflare/resources/magic_network_monitoring/configs/full.py index ef411789377..3e7c2df80e9 100644 --- a/src/cloudflare/resources/magic_network_monitoring/configs/full.py +++ b/src/cloudflare/resources/magic_network_monitoring/configs/full.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.magic_network_monitoring.configuration import Configuration __all__ = ["FullResource", "AsyncFullResource"] diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py b/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py index 73550783cd7..b50a63f2784 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.magic_network_monitoring.rules import advertisement_edit_params from ....types.magic_network_monitoring.rules.advertisement import Advertisement diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py index 5d1deee2646..d963c020ce0 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py @@ -29,10 +29,7 @@ AdvertisementsResourceWithStreamingResponse, AsyncAdvertisementsResourceWithStreamingResponse, ) -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.magic_network_monitoring import rule_edit_params, rule_create_params, rule_update_params from ....types.magic_network_monitoring.magic_network_monitoring_rule import MagicNetworkMonitoringRule diff --git a/src/cloudflare/resources/magic_transit/apps.py b/src/cloudflare/resources/magic_transit/apps.py index c0e9b974eec..d2f727e82ea 100644 --- a/src/cloudflare/resources/magic_transit/apps.py +++ b/src/cloudflare/resources/magic_transit/apps.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.magic_transit import app_create_params, app_update_params from ...types.magic_transit.app_list_response import AppListResponse from ...types.magic_transit.app_create_response import AppCreateResponse diff --git a/src/cloudflare/resources/magic_transit/cf_interconnects.py b/src/cloudflare/resources/magic_transit/cf_interconnects.py index e06f3339eaa..1b8f9558567 100644 --- a/src/cloudflare/resources/magic_transit/cf_interconnects.py +++ b/src/cloudflare/resources/magic_transit/cf_interconnects.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +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 diff --git a/src/cloudflare/resources/magic_transit/connectors.py b/src/cloudflare/resources/magic_transit/connectors.py index c9c670927e4..0f881783b86 100644 --- a/src/cloudflare/resources/magic_transit/connectors.py +++ b/src/cloudflare/resources/magic_transit/connectors.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.magic_transit import connector_edit_params, connector_update_params from ...types.magic_transit.connector_get_response import ConnectorGetResponse from ...types.magic_transit.connector_edit_response import ConnectorEditResponse diff --git a/src/cloudflare/resources/magic_transit/gre_tunnels.py b/src/cloudflare/resources/magic_transit/gre_tunnels.py index 0a0ecac6b40..32c92784750 100644 --- a/src/cloudflare/resources/magic_transit/gre_tunnels.py +++ b/src/cloudflare/resources/magic_transit/gre_tunnels.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +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 diff --git a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py index 5628e089a81..f7b347a9460 100644 --- a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py +++ b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.magic_transit import ( ipsec_tunnel_create_params, ipsec_tunnel_update_params, diff --git a/src/cloudflare/resources/magic_transit/routes.py b/src/cloudflare/resources/magic_transit/routes.py index be721725cbc..7d122a07e8e 100644 --- a/src/cloudflare/resources/magic_transit/routes.py +++ b/src/cloudflare/resources/magic_transit/routes.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +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 diff --git a/src/cloudflare/resources/magic_transit/sites/acls.py b/src/cloudflare/resources/magic_transit/sites/acls.py index 6d675b5378a..b7957dd5131 100644 --- a/src/cloudflare/resources/magic_transit/sites/acls.py +++ b/src/cloudflare/resources/magic_transit/sites/acls.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options 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 diff --git a/src/cloudflare/resources/magic_transit/sites/lans.py b/src/cloudflare/resources/magic_transit/sites/lans.py index 307bdcffc9b..8232dbc6418 100644 --- a/src/cloudflare/resources/magic_transit/sites/lans.py +++ b/src/cloudflare/resources/magic_transit/sites/lans.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.magic_transit.sites import ( lan_edit_params, lan_create_params, diff --git a/src/cloudflare/resources/magic_transit/sites/sites.py b/src/cloudflare/resources/magic_transit/sites/sites.py index 67c24a85c6f..ac9dec96af6 100644 --- a/src/cloudflare/resources/magic_transit/sites/sites.py +++ b/src/cloudflare/resources/magic_transit/sites/sites.py @@ -45,10 +45,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.magic_transit import ( site_edit_params, site_list_params, diff --git a/src/cloudflare/resources/magic_transit/sites/wans.py b/src/cloudflare/resources/magic_transit/sites/wans.py index 90cba1d7d90..eb7364a3e58 100644 --- a/src/cloudflare/resources/magic_transit/sites/wans.py +++ b/src/cloudflare/resources/magic_transit/sites/wans.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.magic_transit.sites import wan_edit_params, wan_create_params, wan_update_params from ....types.magic_transit.sites.wan import WAN from ....types.magic_transit.sites.wan_create_response import WANCreateResponse diff --git a/src/cloudflare/resources/managed_headers.py b/src/cloudflare/resources/managed_headers.py index 345adb7d6e5..6f625e31c16 100644 --- a/src/cloudflare/resources/managed_headers.py +++ b/src/cloudflare/resources/managed_headers.py @@ -19,9 +19,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.managed_headers import managed_header_edit_params from ..types.managed_headers.request_model_param import RequestModelParam from ..types.managed_headers.managed_header_edit_response import ManagedHeaderEditResponse diff --git a/src/cloudflare/resources/memberships.py b/src/cloudflare/resources/memberships.py index b4c963fbea7..eee1608095c 100644 --- a/src/cloudflare/resources/memberships.py +++ b/src/cloudflare/resources/memberships.py @@ -22,10 +22,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.memberships import membership_list_params, membership_update_params from ..types.memberships.membership import Membership from ..types.memberships.membership_get_response import MembershipGetResponse diff --git a/src/cloudflare/resources/mtls_certificates/associations.py b/src/cloudflare/resources/mtls_certificates/associations.py index bd3fcd1f7dc..89da4efe30e 100644 --- a/src/cloudflare/resources/mtls_certificates/associations.py +++ b/src/cloudflare/resources/mtls_certificates/associations.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.mtls_certificates.association_get_response import AssociationGetResponse __all__ = ["AssociationsResource", "AsyncAssociationsResource"] diff --git a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py index d6d4f1a60d8..c9a0deacd8d 100644 --- a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py +++ b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py @@ -29,10 +29,7 @@ AssociationsResourceWithStreamingResponse, AsyncAssociationsResourceWithStreamingResponse, ) -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.mtls_certificates import mtls_certificate_create_params from ...types.mtls_certificates.mtls_certificate import MTLSCertificate from ...types.mtls_certificates.mtls_certificate_create_response import MTLSCertificateCreateResponse diff --git a/src/cloudflare/resources/origin_ca_certificates.py b/src/cloudflare/resources/origin_ca_certificates.py index 0469f455fb2..d9c889e484e 100644 --- a/src/cloudflare/resources/origin_ca_certificates.py +++ b/src/cloudflare/resources/origin_ca_certificates.py @@ -22,10 +22,7 @@ from .._wrappers import ResultWrapper from ..types.ssl import RequestValidity from ..pagination import SyncSinglePage, AsyncSinglePage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.ssl.request_validity import RequestValidity from ..types.origin_ca_certificates import origin_ca_certificate_list_params, origin_ca_certificate_create_params from ..types.shared.certificate_request_type import CertificateRequestType diff --git a/src/cloudflare/resources/origin_post_quantum_encryption.py b/src/cloudflare/resources/origin_post_quantum_encryption.py index 58c75a387f7..8ff26e81893 100644 --- a/src/cloudflare/resources/origin_post_quantum_encryption.py +++ b/src/cloudflare/resources/origin_post_quantum_encryption.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.origin_post_quantum_encryption import origin_post_quantum_encryption_update_params from ..types.origin_post_quantum_encryption.origin_post_quantum_encryption_get_response import ( OriginPostQuantumEncryptionGetResponse, diff --git a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py index 9375047412c..cbcf295a206 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.origin_tls_client_auth.hostnames import certificate_create_params from ....types.origin_tls_client_auth.authenticated_origin_pull import AuthenticatedOriginPull from ....types.origin_tls_client_auth.hostnames.certificate_get_response import CertificateGetResponse diff --git a/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py b/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py index 438508acb12..a481ade84de 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py @@ -28,9 +28,7 @@ CertificatesResourceWithStreamingResponse, AsyncCertificatesResourceWithStreamingResponse, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.origin_tls_client_auth import hostname_update_params from ....types.origin_tls_client_auth.hostname_update_response import HostnameUpdateResponse from ....types.origin_tls_client_auth.authenticated_origin_pull import AuthenticatedOriginPull diff --git a/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py b/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py index f1899c77cdf..1eabc1123fe 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py +++ b/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py @@ -37,10 +37,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .hostnames.hostnames import HostnamesResource, AsyncHostnamesResource from ...types.origin_tls_client_auth import origin_tls_client_auth_create_params from ...types.origin_tls_client_auth.zone_authenticated_origin_pull import ZoneAuthenticatedOriginPull diff --git a/src/cloudflare/resources/origin_tls_client_auth/settings.py b/src/cloudflare/resources/origin_tls_client_auth/settings.py index 67fc7cdba8e..1342bbbf064 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/settings.py +++ b/src/cloudflare/resources/origin_tls_client_auth/settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.origin_tls_client_auth import setting_update_params from ...types.origin_tls_client_auth.setting_get_response import SettingGetResponse from ...types.origin_tls_client_auth.setting_update_response import SettingUpdateResponse diff --git a/src/cloudflare/resources/page_shield/connections.py b/src/cloudflare/resources/page_shield/connections.py index e961e1e4bc6..ac42a24e1f6 100644 --- a/src/cloudflare/resources/page_shield/connections.py +++ b/src/cloudflare/resources/page_shield/connections.py @@ -19,10 +19,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.page_shield import connection_list_params from ...types.page_shield.connection import Connection diff --git a/src/cloudflare/resources/page_shield/cookies.py b/src/cloudflare/resources/page_shield/cookies.py index d35ffba6734..cdbc8dc6abb 100644 --- a/src/cloudflare/resources/page_shield/cookies.py +++ b/src/cloudflare/resources/page_shield/cookies.py @@ -19,10 +19,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.page_shield import cookie_list_params from ...types.page_shield.cookie_get_response import CookieGetResponse from ...types.page_shield.cookie_list_response import CookieListResponse diff --git a/src/cloudflare/resources/page_shield/page_shield.py b/src/cloudflare/resources/page_shield/page_shield.py index 9e7d2e27f74..11f6a949378 100644 --- a/src/cloudflare/resources/page_shield/page_shield.py +++ b/src/cloudflare/resources/page_shield/page_shield.py @@ -52,9 +52,7 @@ ConnectionsResourceWithStreamingResponse, AsyncConnectionsResourceWithStreamingResponse, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.page_shield import page_shield_update_params from ...types.page_shield.setting import Setting from ...types.page_shield.page_shield_update_response import PageShieldUpdateResponse diff --git a/src/cloudflare/resources/page_shield/policies.py b/src/cloudflare/resources/page_shield/policies.py index de2822019e7..645079e3e9b 100644 --- a/src/cloudflare/resources/page_shield/policies.py +++ b/src/cloudflare/resources/page_shield/policies.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.page_shield import policy_create_params, policy_update_params from ...types.page_shield.policy_get_response import PolicyGetResponse from ...types.page_shield.policy_list_response import PolicyListResponse diff --git a/src/cloudflare/resources/page_shield/scripts.py b/src/cloudflare/resources/page_shield/scripts.py index 2a3e556f7cc..541aefbee44 100644 --- a/src/cloudflare/resources/page_shield/scripts.py +++ b/src/cloudflare/resources/page_shield/scripts.py @@ -19,10 +19,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.page_shield import script_list_params from ...types.page_shield.script import Script from ...types.page_shield.script_get_response import ScriptGetResponse diff --git a/src/cloudflare/resources/pagerules/pagerules.py b/src/cloudflare/resources/pagerules/pagerules.py index 440b172abde..5f251b595db 100644 --- a/src/cloudflare/resources/pagerules/pagerules.py +++ b/src/cloudflare/resources/pagerules/pagerules.py @@ -30,9 +30,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.pagerules import ( pagerule_edit_params, pagerule_list_params, diff --git a/src/cloudflare/resources/pagerules/settings.py b/src/cloudflare/resources/pagerules/settings.py index b89f657bbbb..450fac94b4d 100644 --- a/src/cloudflare/resources/pagerules/settings.py +++ b/src/cloudflare/resources/pagerules/settings.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.pagerules.setting_list_response import SettingListResponse __all__ = ["SettingsResource", "AsyncSettingsResource"] diff --git a/src/cloudflare/resources/pages/projects/deployments/deployments.py b/src/cloudflare/resources/pages/projects/deployments/deployments.py index 73ce05e0bfb..f2c545dc237 100644 --- a/src/cloudflare/resources/pages/projects/deployments/deployments.py +++ b/src/cloudflare/resources/pages/projects/deployments/deployments.py @@ -31,10 +31,7 @@ from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage from .history.history import HistoryResource, AsyncHistoryResource -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.pages.projects import ( deployment_list_params, deployment_retry_params, diff --git a/src/cloudflare/resources/pages/projects/deployments/history/logs.py b/src/cloudflare/resources/pages/projects/deployments/history/logs.py index b3a5e2aaf67..631dd9e7aab 100644 --- a/src/cloudflare/resources/pages/projects/deployments/history/logs.py +++ b/src/cloudflare/resources/pages/projects/deployments/history/logs.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.pages.projects.deployments.history.log_get_response import LogGetResponse __all__ = ["LogsResource", "AsyncLogsResource"] diff --git a/src/cloudflare/resources/pages/projects/domains.py b/src/cloudflare/resources/pages/projects/domains.py index 65054b9aa45..7e6c839a248 100644 --- a/src/cloudflare/resources/pages/projects/domains.py +++ b/src/cloudflare/resources/pages/projects/domains.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.pages.projects import domain_edit_params, domain_create_params from ....types.pages.projects.domain_get_response import DomainGetResponse from ....types.pages.projects.domain_edit_response import DomainEditResponse diff --git a/src/cloudflare/resources/pages/projects/projects.py b/src/cloudflare/resources/pages/projects/projects.py index 09b5912fffb..ced923eda18 100644 --- a/src/cloudflare/resources/pages/projects/projects.py +++ b/src/cloudflare/resources/pages/projects/projects.py @@ -38,10 +38,7 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.pages import Deployment, project_edit_params, project_create_params -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.pages.project import Project from .deployments.deployments import DeploymentsResource, AsyncDeploymentsResource from ....types.pages.deployment import Deployment diff --git a/src/cloudflare/resources/pcaps/download.py b/src/cloudflare/resources/pcaps/download.py index de8e8fa0168..84cfebf9c6b 100644 --- a/src/cloudflare/resources/pcaps/download.py +++ b/src/cloudflare/resources/pcaps/download.py @@ -17,9 +17,7 @@ async_to_custom_raw_response_wrapper, async_to_custom_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options __all__ = ["DownloadResource", "AsyncDownloadResource"] diff --git a/src/cloudflare/resources/pcaps/ownership.py b/src/cloudflare/resources/pcaps/ownership.py index 618d9796ddd..fb7229716c9 100644 --- a/src/cloudflare/resources/pcaps/ownership.py +++ b/src/cloudflare/resources/pcaps/ownership.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.pcaps import ownership_create_params, ownership_validate_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.pcaps.ownership import Ownership from ...types.pcaps.ownership_get_response import OwnershipGetResponse diff --git a/src/cloudflare/resources/pcaps/pcaps.py b/src/cloudflare/resources/pcaps/pcaps.py index e6ea121deb1..88b6a85dc45 100644 --- a/src/cloudflare/resources/pcaps/pcaps.py +++ b/src/cloudflare/resources/pcaps/pcaps.py @@ -40,10 +40,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.pcaps import pcap_create_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.pcaps.pcap_filter_param import PCAPFilterParam from ...types.pcaps.pcap_get_response import PCAPGetResponse from ...types.pcaps.pcap_list_response import PCAPListResponse diff --git a/src/cloudflare/resources/plans.py b/src/cloudflare/resources/plans.py index fc177c15925..fec32838ad7 100644 --- a/src/cloudflare/resources/plans.py +++ b/src/cloudflare/resources/plans.py @@ -17,10 +17,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncSinglePage, AsyncSinglePage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.plans.available_rate_plan import AvailableRatePlan __all__ = ["PlansResource", "AsyncPlansResource"] diff --git a/src/cloudflare/resources/queues/consumers.py b/src/cloudflare/resources/queues/consumers.py index 9854d15ce64..62500828562 100644 --- a/src/cloudflare/resources/queues/consumers.py +++ b/src/cloudflare/resources/queues/consumers.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.queues import consumer_create_params, consumer_update_params from ...types.queues.consumer_get_response import ConsumerGetResponse from ...types.queues.consumer_create_response import ConsumerCreateResponse diff --git a/src/cloudflare/resources/queues/messages.py b/src/cloudflare/resources/queues/messages.py index 8b651b0dcf2..61a6e360ed3 100644 --- a/src/cloudflare/resources/queues/messages.py +++ b/src/cloudflare/resources/queues/messages.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.queues import message_ack_params, message_pull_params from ...types.queues.message_ack_response import MessageAckResponse from ...types.queues.message_pull_response import MessagePullResponse diff --git a/src/cloudflare/resources/queues/queues.py b/src/cloudflare/resources/queues/queues.py index 39a6012d574..f3995757a32 100644 --- a/src/cloudflare/resources/queues/queues.py +++ b/src/cloudflare/resources/queues/queues.py @@ -37,10 +37,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.queues import queue_create_params, queue_update_params from ...types.queues.queue import Queue from ...types.queues.queue_created import QueueCreated diff --git a/src/cloudflare/resources/r2/buckets.py b/src/cloudflare/resources/r2/buckets.py index 2b322b7a24c..bde62555b2f 100644 --- a/src/cloudflare/resources/r2/buckets.py +++ b/src/cloudflare/resources/r2/buckets.py @@ -23,10 +23,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncCursorPagination, AsyncCursorPagination -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.r2.bucket import Bucket __all__ = ["BucketsResource", "AsyncBucketsResource"] diff --git a/src/cloudflare/resources/r2/sippy.py b/src/cloudflare/resources/r2/sippy.py index 7f134a5e730..178f4279f44 100644 --- a/src/cloudflare/resources/r2/sippy.py +++ b/src/cloudflare/resources/r2/sippy.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.r2.sippy import Sippy from ...types.r2.sippy_delete_response import SippyDeleteResponse diff --git a/src/cloudflare/resources/r2/temporary_credentials.py b/src/cloudflare/resources/r2/temporary_credentials.py index 48de6924ad5..9715a6feadd 100644 --- a/src/cloudflare/resources/r2/temporary_credentials.py +++ b/src/cloudflare/resources/r2/temporary_credentials.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.r2.temporary_credential_create_response import TemporaryCredentialCreateResponse __all__ = ["TemporaryCredentialsResource", "AsyncTemporaryCredentialsResource"] diff --git a/src/cloudflare/resources/radar/annotations/outages.py b/src/cloudflare/resources/radar/annotations/outages.py index b940c62d3e9..12344d7d80e 100644 --- a/src/cloudflare/resources/radar/annotations/outages.py +++ b/src/cloudflare/resources/radar/annotations/outages.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.annotations import outage_get_params, outage_locations_params from ....types.radar.annotations.outage_get_response import OutageGetResponse from ....types.radar.annotations.outage_locations_response import OutageLocationsResponse diff --git a/src/cloudflare/resources/radar/as112/as112.py b/src/cloudflare/resources/radar/as112/as112.py index 001bf5096a3..bdd295c2412 100644 --- a/src/cloudflare/resources/radar/as112/as112.py +++ b/src/cloudflare/resources/radar/as112/as112.py @@ -39,9 +39,7 @@ ) from ...._wrappers import ResultWrapper from ....types.radar import as112_timeseries_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from .timeseries_groups import ( TimeseriesGroupsResource, AsyncTimeseriesGroupsResource, diff --git a/src/cloudflare/resources/radar/as112/summary.py b/src/cloudflare/resources/radar/as112/summary.py index f09a163e607..2e695cbfd97 100644 --- a/src/cloudflare/resources/radar/as112/summary.py +++ b/src/cloudflare/resources/radar/as112/summary.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.as112 import ( summary_edns_params, summary_dnssec_params, diff --git a/src/cloudflare/resources/radar/as112/timeseries_groups.py b/src/cloudflare/resources/radar/as112/timeseries_groups.py index 5e8483aec01..2b654a4a755 100644 --- a/src/cloudflare/resources/radar/as112/timeseries_groups.py +++ b/src/cloudflare/resources/radar/as112/timeseries_groups.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.as112 import ( timeseries_group_edns_params, timeseries_group_dnssec_params, diff --git a/src/cloudflare/resources/radar/as112/top.py b/src/cloudflare/resources/radar/as112/top.py index 3135f52f389..85152434160 100644 --- a/src/cloudflare/resources/radar/as112/top.py +++ b/src/cloudflare/resources/radar/as112/top.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.as112 import top_edns_params, top_dnssec_params, top_locations_params, top_ip_version_params from ....types.radar.as112.top_edns_response import TopEdnsResponse from ....types.radar.as112.top_dnssec_response import TopDNSSECResponse diff --git a/src/cloudflare/resources/radar/attacks/layer3/layer3.py b/src/cloudflare/resources/radar/attacks/layer3/layer3.py index 38f01fdb86a..40608aa9246 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/layer3.py +++ b/src/cloudflare/resources/radar/attacks/layer3/layer3.py @@ -39,9 +39,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .timeseries_groups import ( TimeseriesGroupsResource, AsyncTimeseriesGroupsResource, diff --git a/src/cloudflare/resources/radar/attacks/layer3/summary.py b/src/cloudflare/resources/radar/attacks/layer3/summary.py index b3df7e5b719..9f83b0a9198 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/summary.py +++ b/src/cloudflare/resources/radar/attacks/layer3/summary.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.attacks.layer3 import ( summary_get_params, summary_vector_params, diff --git a/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py b/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py index 5acfbac08cc..353c8457d47 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py +++ b/src/cloudflare/resources/radar/attacks/layer3/timeseries_groups.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.attacks.layer3 import ( timeseries_group_get_params, timeseries_group_vector_params, diff --git a/src/cloudflare/resources/radar/attacks/layer3/top/locations.py b/src/cloudflare/resources/radar/attacks/layer3/top/locations.py index f4502c459c7..fb70d8bcbd7 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/top/locations.py +++ b/src/cloudflare/resources/radar/attacks/layer3/top/locations.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.radar.attacks.layer3.top import location_origin_params, location_target_params from ......types.radar.attacks.layer3.top.location_origin_response import LocationOriginResponse from ......types.radar.attacks.layer3.top.location_target_response import LocationTargetResponse diff --git a/src/cloudflare/resources/radar/attacks/layer3/top/top.py b/src/cloudflare/resources/radar/attacks/layer3/top/top.py index 362a4b1942f..3e6817465e2 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/top/top.py +++ b/src/cloudflare/resources/radar/attacks/layer3/top/top.py @@ -30,9 +30,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.radar.attacks.layer3 import top_attacks_params, top_industry_params, top_vertical_params from ......types.radar.attacks.layer3.top_attacks_response import TopAttacksResponse from ......types.radar.attacks.layer3.top_industry_response import TopIndustryResponse diff --git a/src/cloudflare/resources/radar/attacks/layer7/layer7.py b/src/cloudflare/resources/radar/attacks/layer7/layer7.py index a758fc05c92..3677d19f359 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/layer7.py +++ b/src/cloudflare/resources/radar/attacks/layer7/layer7.py @@ -39,9 +39,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .timeseries_groups import ( TimeseriesGroupsResource, AsyncTimeseriesGroupsResource, diff --git a/src/cloudflare/resources/radar/attacks/layer7/summary.py b/src/cloudflare/resources/radar/attacks/layer7/summary.py index 668b40c9374..8eaccf847dd 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/summary.py +++ b/src/cloudflare/resources/radar/attacks/layer7/summary.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.attacks.layer7 import ( summary_get_params, summary_ip_version_params, diff --git a/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py b/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py index 674cde10cc1..47260ea2ee2 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py +++ b/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.attacks.layer7 import ( timeseries_group_get_params, timeseries_group_industry_params, diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/ases.py b/src/cloudflare/resources/radar/attacks/layer7/top/ases.py index 9f50e400b86..f43f40bd92f 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/ases.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/ases.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.radar.attacks.layer7.top import ase_origin_params from ......types.radar.attacks.layer7.top.ase_origin_response import AseOriginResponse diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/locations.py b/src/cloudflare/resources/radar/attacks/layer7/top/locations.py index 3933d5470d0..7a7f9f867c7 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/locations.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/locations.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.radar.attacks.layer7.top import location_origin_params, location_target_params from ......types.radar.attacks.layer7.top.location_origin_response import LocationOriginResponse from ......types.radar.attacks.layer7.top.location_target_response import LocationTargetResponse diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/top.py b/src/cloudflare/resources/radar/attacks/layer7/top/top.py index e8a536854de..685caa45d7b 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/top.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/top.py @@ -38,9 +38,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.radar.attacks.layer7 import top_attacks_params, top_industry_params, top_vertical_params from ......types.radar.attacks.layer7.top_attacks_response import TopAttacksResponse from ......types.radar.attacks.layer7.top_industry_response import TopIndustryResponse diff --git a/src/cloudflare/resources/radar/bgp/bgp.py b/src/cloudflare/resources/radar/bgp/bgp.py index c8719a1c2d0..b02292f89e7 100644 --- a/src/cloudflare/resources/radar/bgp/bgp.py +++ b/src/cloudflare/resources/radar/bgp/bgp.py @@ -65,9 +65,7 @@ ) from ...._wrappers import ResultWrapper from ....types.radar import bgp_timeseries_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from .hijacks.hijacks import HijacksResource, AsyncHijacksResource from ....types.radar.bgp_timeseries_response import BGPTimeseriesResponse diff --git a/src/cloudflare/resources/radar/bgp/hijacks/events.py b/src/cloudflare/resources/radar/bgp/hijacks/events.py index f05e43f6ee9..14867a2ca72 100644 --- a/src/cloudflare/resources/radar/bgp/hijacks/events.py +++ b/src/cloudflare/resources/radar/bgp/hijacks/events.py @@ -19,10 +19,7 @@ async_to_streamed_response_wrapper, ) from .....pagination import SyncV4PagePagination, AsyncV4PagePagination -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.radar.bgp.hijacks import event_list_params from .....types.radar.bgp.hijacks.event_list_response import EventListResponse diff --git a/src/cloudflare/resources/radar/bgp/ips.py b/src/cloudflare/resources/radar/bgp/ips.py index 7fed750692b..8ea07a04ee7 100644 --- a/src/cloudflare/resources/radar/bgp/ips.py +++ b/src/cloudflare/resources/radar/bgp/ips.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.bgp import ip_timeseries_params from ....types.radar.bgp.ip_timeseries_response import IPTimeseriesResponse diff --git a/src/cloudflare/resources/radar/bgp/leaks/events.py b/src/cloudflare/resources/radar/bgp/leaks/events.py index 3858ef130c2..61b19dfeb74 100644 --- a/src/cloudflare/resources/radar/bgp/leaks/events.py +++ b/src/cloudflare/resources/radar/bgp/leaks/events.py @@ -19,10 +19,7 @@ async_to_streamed_response_wrapper, ) from .....pagination import SyncV4PagePagination, AsyncV4PagePagination -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.radar.bgp.leaks import event_list_params from .....types.radar.bgp.leaks.event_list_response import EventListResponse diff --git a/src/cloudflare/resources/radar/bgp/routes.py b/src/cloudflare/resources/radar/bgp/routes.py index 104c66fdd4d..7f16e51043e 100644 --- a/src/cloudflare/resources/radar/bgp/routes.py +++ b/src/cloudflare/resources/radar/bgp/routes.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.bgp import route_ases_params, route_moas_params, route_stats_params, route_pfx2as_params from ....types.radar.bgp.route_ases_response import RouteAsesResponse from ....types.radar.bgp.route_moas_response import RouteMoasResponse diff --git a/src/cloudflare/resources/radar/bgp/top/ases.py b/src/cloudflare/resources/radar/bgp/top/ases.py index 46fee488bd1..d0f5b339eed 100644 --- a/src/cloudflare/resources/radar/bgp/top/ases.py +++ b/src/cloudflare/resources/radar/bgp/top/ases.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.bgp.top import ase_get_params, ase_prefixes_params from .....types.radar.bgp.top.ase_get_response import AseGetResponse from .....types.radar.bgp.top.ase_prefixes_response import AsePrefixesResponse diff --git a/src/cloudflare/resources/radar/bgp/top/top.py b/src/cloudflare/resources/radar/bgp/top/top.py index a87beb5628c..b9ab93e865d 100644 --- a/src/cloudflare/resources/radar/bgp/top/top.py +++ b/src/cloudflare/resources/radar/bgp/top/top.py @@ -30,9 +30,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.bgp import top_prefixes_params from .....types.radar.bgp.top_prefixes_response import TopPrefixesResponse diff --git a/src/cloudflare/resources/radar/connection_tampering.py b/src/cloudflare/resources/radar/connection_tampering.py index 44bc7e79514..1371c2288ee 100644 --- a/src/cloudflare/resources/radar/connection_tampering.py +++ b/src/cloudflare/resources/radar/connection_tampering.py @@ -23,9 +23,7 @@ ) from ..._wrappers import ResultWrapper from ...types.radar import connection_tampering_summary_params, connection_tampering_timeseries_groups_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.radar.connection_tampering_summary_response import ConnectionTamperingSummaryResponse from ...types.radar.connection_tampering_timeseries_groups_response import ConnectionTamperingTimeseriesGroupsResponse diff --git a/src/cloudflare/resources/radar/datasets.py b/src/cloudflare/resources/radar/datasets.py index 68a0bf3e5f1..632237f86d6 100644 --- a/src/cloudflare/resources/radar/datasets.py +++ b/src/cloudflare/resources/radar/datasets.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.radar import dataset_list_params, dataset_download_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.radar.dataset_list_response import DatasetListResponse from ...types.radar.dataset_download_response import DatasetDownloadResponse diff --git a/src/cloudflare/resources/radar/dns/top.py b/src/cloudflare/resources/radar/dns/top.py index a6de409e52d..717d70919d0 100644 --- a/src/cloudflare/resources/radar/dns/top.py +++ b/src/cloudflare/resources/radar/dns/top.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.dns import top_ases_params, top_locations_params from ....types.radar.dns.top_ases_response import TopAsesResponse from ....types.radar.dns.top_locations_response import TopLocationsResponse diff --git a/src/cloudflare/resources/radar/email/routing/summary.py b/src/cloudflare/resources/radar/email/routing/summary.py index fb1824d133c..d6574ac8585 100644 --- a/src/cloudflare/resources/radar/email/routing/summary.py +++ b/src/cloudflare/resources/radar/email/routing/summary.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.email.routing import ( summary_arc_params, summary_spf_params, diff --git a/src/cloudflare/resources/radar/email/routing/timeseries_groups.py b/src/cloudflare/resources/radar/email/routing/timeseries_groups.py index 81257512408..5a54a062f1b 100644 --- a/src/cloudflare/resources/radar/email/routing/timeseries_groups.py +++ b/src/cloudflare/resources/radar/email/routing/timeseries_groups.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.email.routing import ( timeseries_group_arc_params, timeseries_group_spf_params, diff --git a/src/cloudflare/resources/radar/email/security/summary.py b/src/cloudflare/resources/radar/email/security/summary.py index aeb6c50f64d..a31f5660e8c 100644 --- a/src/cloudflare/resources/radar/email/security/summary.py +++ b/src/cloudflare/resources/radar/email/security/summary.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.email.security import ( summary_arc_params, summary_spf_params, diff --git a/src/cloudflare/resources/radar/email/security/timeseries_groups.py b/src/cloudflare/resources/radar/email/security/timeseries_groups.py index f6e2ec05ce5..c957c81c55b 100644 --- a/src/cloudflare/resources/radar/email/security/timeseries_groups.py +++ b/src/cloudflare/resources/radar/email/security/timeseries_groups.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.email.security import ( timeseries_group_arc_params, timeseries_group_spf_params, diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py b/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py index 4592716dfbe..d6877ec1080 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/malicious.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ......._wrappers import ResultWrapper -from ......._base_client import ( - make_request_options, -) +from ......._base_client import make_request_options from .......types.radar.email.security.top.tlds import malicious_get_params from .......types.radar.email.security.top.tlds.malicious_get_response import MaliciousGetResponse diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/spam.py b/src/cloudflare/resources/radar/email/security/top/tlds/spam.py index 4a9081d4e8c..f97f98691f3 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/spam.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/spam.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ......._wrappers import ResultWrapper -from ......._base_client import ( - make_request_options, -) +from ......._base_client import make_request_options from .......types.radar.email.security.top.tlds import spam_get_params from .......types.radar.email.security.top.tlds.spam_get_response import SpamGetResponse diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py b/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py index 23bb1b51a2c..865a62aa66b 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/spoof.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ......._wrappers import ResultWrapper -from ......._base_client import ( - make_request_options, -) +from ......._base_client import make_request_options from .......types.radar.email.security.top.tlds import spoof_get_params from .......types.radar.email.security.top.tlds.spoof_get_response import SpoofGetResponse diff --git a/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py b/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py index 34a194b6e7d..23c281c9eb9 100644 --- a/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py +++ b/src/cloudflare/resources/radar/email/security/top/tlds/tlds.py @@ -46,9 +46,7 @@ async_to_streamed_response_wrapper, ) from ......._wrappers import ResultWrapper -from ......._base_client import ( - make_request_options, -) +from ......._base_client import make_request_options from .......types.radar.email.security.top import tld_get_params from .......types.radar.email.security.top.tld_get_response import TldGetResponse diff --git a/src/cloudflare/resources/radar/entities/asns.py b/src/cloudflare/resources/radar/entities/asns.py index f0479103d73..4aa81250ed1 100644 --- a/src/cloudflare/resources/radar/entities/asns.py +++ b/src/cloudflare/resources/radar/entities/asns.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.entities import asn_ip_params, asn_get_params, asn_rel_params, asn_list_params from ....types.radar.entities.asn_ip_response import ASNIPResponse from ....types.radar.entities.asn_get_response import ASNGetResponse diff --git a/src/cloudflare/resources/radar/entities/entities.py b/src/cloudflare/resources/radar/entities/entities.py index 7308469e676..291834dcb5e 100644 --- a/src/cloudflare/resources/radar/entities/entities.py +++ b/src/cloudflare/resources/radar/entities/entities.py @@ -38,9 +38,7 @@ ) from ...._wrappers import ResultWrapper from ....types.radar import entity_get_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.entity_get_response import EntityGetResponse __all__ = ["EntitiesResource", "AsyncEntitiesResource"] diff --git a/src/cloudflare/resources/radar/entities/locations.py b/src/cloudflare/resources/radar/entities/locations.py index a05fa19ad17..fb242a70bbb 100644 --- a/src/cloudflare/resources/radar/entities/locations.py +++ b/src/cloudflare/resources/radar/entities/locations.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.entities import location_get_params, location_list_params from ....types.radar.entities.location_get_response import LocationGetResponse from ....types.radar.entities.location_list_response import LocationListResponse diff --git a/src/cloudflare/resources/radar/http/ases/ases.py b/src/cloudflare/resources/radar/http/ases/ases.py index d6d2ad58304..a275adbc00d 100644 --- a/src/cloudflare/resources/radar/http/ases/ases.py +++ b/src/cloudflare/resources/radar/http/ases/ases.py @@ -86,9 +86,7 @@ BrowserFamilyResourceWithStreamingResponse, AsyncBrowserFamilyResourceWithStreamingResponse, ) -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http import ase_get_params from .....types.radar.http.ase_get_response import AseGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/bot_class.py b/src/cloudflare/resources/radar/http/ases/bot_class.py index c03bae87325..3f4493e31ea 100644 --- a/src/cloudflare/resources/radar/http/ases/bot_class.py +++ b/src/cloudflare/resources/radar/http/ases/bot_class.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import bot_class_get_params from .....types.radar.http.ases.bot_class_get_response import BotClassGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/browser_family.py b/src/cloudflare/resources/radar/http/ases/browser_family.py index de15a3b0458..bcc9fb10647 100644 --- a/src/cloudflare/resources/radar/http/ases/browser_family.py +++ b/src/cloudflare/resources/radar/http/ases/browser_family.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import browser_family_get_params from .....types.radar.http.ases.browser_family_get_response import BrowserFamilyGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/device_type.py b/src/cloudflare/resources/radar/http/ases/device_type.py index ff5763c2b2e..13de5ce2c67 100644 --- a/src/cloudflare/resources/radar/http/ases/device_type.py +++ b/src/cloudflare/resources/radar/http/ases/device_type.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import device_type_get_params from .....types.radar.http.ases.device_type_get_response import DeviceTypeGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/http_method.py b/src/cloudflare/resources/radar/http/ases/http_method.py index 60a9eb8788e..8a2527c126d 100644 --- a/src/cloudflare/resources/radar/http/ases/http_method.py +++ b/src/cloudflare/resources/radar/http/ases/http_method.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import http_method_get_params from .....types.radar.http.ases.http_method_get_response import HTTPMethodGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/http_protocol.py b/src/cloudflare/resources/radar/http/ases/http_protocol.py index 9758dcaba3c..69342c498fe 100644 --- a/src/cloudflare/resources/radar/http/ases/http_protocol.py +++ b/src/cloudflare/resources/radar/http/ases/http_protocol.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import http_protocol_get_params from .....types.radar.http.ases.http_protocol_get_response import HTTPProtocolGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/ip_version.py b/src/cloudflare/resources/radar/http/ases/ip_version.py index 5893e869d28..30c602493a0 100644 --- a/src/cloudflare/resources/radar/http/ases/ip_version.py +++ b/src/cloudflare/resources/radar/http/ases/ip_version.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import ip_version_get_params from .....types.radar.http.ases.ip_version_get_response import IPVersionGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/os.py b/src/cloudflare/resources/radar/http/ases/os.py index 7cb193797b2..f394fff7819 100644 --- a/src/cloudflare/resources/radar/http/ases/os.py +++ b/src/cloudflare/resources/radar/http/ases/os.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import os_get_params from .....types.radar.http.ases.os_get_response import OSGetResponse diff --git a/src/cloudflare/resources/radar/http/ases/tls_version.py b/src/cloudflare/resources/radar/http/ases/tls_version.py index 461c710a6a9..22ab58f84c1 100644 --- a/src/cloudflare/resources/radar/http/ases/tls_version.py +++ b/src/cloudflare/resources/radar/http/ases/tls_version.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.ases import tls_version_get_params from .....types.radar.http.ases.tls_version_get_response import TLSVersionGetResponse diff --git a/src/cloudflare/resources/radar/http/http.py b/src/cloudflare/resources/radar/http/http.py index 1af39552df9..725429a8b08 100644 --- a/src/cloudflare/resources/radar/http/http.py +++ b/src/cloudflare/resources/radar/http/http.py @@ -56,9 +56,7 @@ ) from ...._wrappers import ResultWrapper from ....types.radar import http_timeseries_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from .timeseries_groups import ( TimeseriesGroupsResource, AsyncTimeseriesGroupsResource, diff --git a/src/cloudflare/resources/radar/http/locations/bot_class.py b/src/cloudflare/resources/radar/http/locations/bot_class.py index 2706a45d5e4..943db404c22 100644 --- a/src/cloudflare/resources/radar/http/locations/bot_class.py +++ b/src/cloudflare/resources/radar/http/locations/bot_class.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import bot_class_get_params from .....types.radar.http.locations.bot_class_get_response import BotClassGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/browser_family.py b/src/cloudflare/resources/radar/http/locations/browser_family.py index 59147b2bc73..3c5693a7e01 100644 --- a/src/cloudflare/resources/radar/http/locations/browser_family.py +++ b/src/cloudflare/resources/radar/http/locations/browser_family.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import browser_family_get_params from .....types.radar.http.locations.browser_family_get_response import BrowserFamilyGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/device_type.py b/src/cloudflare/resources/radar/http/locations/device_type.py index 6548efb7524..982e239c758 100644 --- a/src/cloudflare/resources/radar/http/locations/device_type.py +++ b/src/cloudflare/resources/radar/http/locations/device_type.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import device_type_get_params from .....types.radar.http.locations.device_type_get_response import DeviceTypeGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/http_method.py b/src/cloudflare/resources/radar/http/locations/http_method.py index e9d4ca2e962..54df750513e 100644 --- a/src/cloudflare/resources/radar/http/locations/http_method.py +++ b/src/cloudflare/resources/radar/http/locations/http_method.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import http_method_get_params from .....types.radar.http.locations.http_method_get_response import HTTPMethodGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/http_protocol.py b/src/cloudflare/resources/radar/http/locations/http_protocol.py index ed5d3c645a1..5c434792c6b 100644 --- a/src/cloudflare/resources/radar/http/locations/http_protocol.py +++ b/src/cloudflare/resources/radar/http/locations/http_protocol.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import http_protocol_get_params from .....types.radar.http.locations.http_protocol_get_response import HTTPProtocolGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/ip_version.py b/src/cloudflare/resources/radar/http/locations/ip_version.py index 0deeca9d177..c41ee965321 100644 --- a/src/cloudflare/resources/radar/http/locations/ip_version.py +++ b/src/cloudflare/resources/radar/http/locations/ip_version.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import ip_version_get_params from .....types.radar.http.locations.ip_version_get_response import IPVersionGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/locations.py b/src/cloudflare/resources/radar/http/locations/locations.py index 81be28116ae..9055706a402 100644 --- a/src/cloudflare/resources/radar/http/locations/locations.py +++ b/src/cloudflare/resources/radar/http/locations/locations.py @@ -86,9 +86,7 @@ BrowserFamilyResourceWithStreamingResponse, AsyncBrowserFamilyResourceWithStreamingResponse, ) -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http import location_get_params from .....types.radar.http.location_get_response import LocationGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/os.py b/src/cloudflare/resources/radar/http/locations/os.py index 3d118f38c69..131769f84dc 100644 --- a/src/cloudflare/resources/radar/http/locations/os.py +++ b/src/cloudflare/resources/radar/http/locations/os.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import os_get_params from .....types.radar.http.locations.os_get_response import OSGetResponse diff --git a/src/cloudflare/resources/radar/http/locations/tls_version.py b/src/cloudflare/resources/radar/http/locations/tls_version.py index fb1b79d26da..0ece72750aa 100644 --- a/src/cloudflare/resources/radar/http/locations/tls_version.py +++ b/src/cloudflare/resources/radar/http/locations/tls_version.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.http.locations import tls_version_get_params from .....types.radar.http.locations.tls_version_get_response import TLSVersionGetResponse diff --git a/src/cloudflare/resources/radar/http/summary.py b/src/cloudflare/resources/radar/http/summary.py index 57596ffceba..59e479d8ce6 100644 --- a/src/cloudflare/resources/radar/http/summary.py +++ b/src/cloudflare/resources/radar/http/summary.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.http import ( summary_os_params, summary_bot_class_params, diff --git a/src/cloudflare/resources/radar/http/timeseries_groups.py b/src/cloudflare/resources/radar/http/timeseries_groups.py index cc70a7d7b0e..d1e43be8b77 100644 --- a/src/cloudflare/resources/radar/http/timeseries_groups.py +++ b/src/cloudflare/resources/radar/http/timeseries_groups.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.http import ( timeseries_group_os_params, timeseries_group_browser_params, diff --git a/src/cloudflare/resources/radar/http/top.py b/src/cloudflare/resources/radar/http/top.py index 63140658a23..53c92195d72 100644 --- a/src/cloudflare/resources/radar/http/top.py +++ b/src/cloudflare/resources/radar/http/top.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.http import top_browsers_params, top_browser_families_params from ....types.radar.http.top_browsers_response import TopBrowsersResponse from ....types.radar.http.top_browser_families_response import TopBrowserFamiliesResponse diff --git a/src/cloudflare/resources/radar/netflows/netflows.py b/src/cloudflare/resources/radar/netflows/netflows.py index 5453b325052..c40b62990df 100644 --- a/src/cloudflare/resources/radar/netflows/netflows.py +++ b/src/cloudflare/resources/radar/netflows/netflows.py @@ -31,9 +31,7 @@ ) from ...._wrappers import ResultWrapper from ....types.radar import netflow_timeseries_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.netflow_timeseries_response import NetflowTimeseriesResponse __all__ = ["NetflowsResource", "AsyncNetflowsResource"] diff --git a/src/cloudflare/resources/radar/netflows/top.py b/src/cloudflare/resources/radar/netflows/top.py index be6a6848054..a16cb4ef770 100644 --- a/src/cloudflare/resources/radar/netflows/top.py +++ b/src/cloudflare/resources/radar/netflows/top.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.netflows import top_ases_params, top_locations_params from ....types.radar.netflows.top_ases_response import TopAsesResponse from ....types.radar.netflows.top_locations_response import TopLocationsResponse diff --git a/src/cloudflare/resources/radar/quality/iqi.py b/src/cloudflare/resources/radar/quality/iqi.py index cdae7e1963c..ceb5522fc2c 100644 --- a/src/cloudflare/resources/radar/quality/iqi.py +++ b/src/cloudflare/resources/radar/quality/iqi.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.quality import iqi_summary_params, iqi_timeseries_groups_params from ....types.radar.quality.iqi_summary_response import IQISummaryResponse from ....types.radar.quality.iqi_timeseries_groups_response import IQITimeseriesGroupsResponse diff --git a/src/cloudflare/resources/radar/quality/speed/speed.py b/src/cloudflare/resources/radar/quality/speed/speed.py index 83d157cd559..58823322df2 100644 --- a/src/cloudflare/resources/radar/quality/speed/speed.py +++ b/src/cloudflare/resources/radar/quality/speed/speed.py @@ -30,9 +30,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.quality import speed_summary_params, speed_histogram_params from .....types.radar.quality.speed_summary_response import SpeedSummaryResponse from .....types.radar.quality.speed_histogram_response import SpeedHistogramResponse diff --git a/src/cloudflare/resources/radar/quality/speed/top.py b/src/cloudflare/resources/radar/quality/speed/top.py index 847810362a3..966bcea0eb9 100644 --- a/src/cloudflare/resources/radar/quality/speed/top.py +++ b/src/cloudflare/resources/radar/quality/speed/top.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.radar.quality.speed import top_ases_params, top_locations_params from .....types.radar.quality.speed.top_ases_response import TopAsesResponse from .....types.radar.quality.speed.top_locations_response import TopLocationsResponse diff --git a/src/cloudflare/resources/radar/ranking/domain.py b/src/cloudflare/resources/radar/ranking/domain.py index 3cc705d7ad6..c44caa95006 100644 --- a/src/cloudflare/resources/radar/ranking/domain.py +++ b/src/cloudflare/resources/radar/ranking/domain.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.ranking import domain_get_params from ....types.radar.ranking.domain_get_response import DomainGetResponse diff --git a/src/cloudflare/resources/radar/ranking/ranking.py b/src/cloudflare/resources/radar/ranking/ranking.py index f30e864a07a..0bfe61b8dc0 100644 --- a/src/cloudflare/resources/radar/ranking/ranking.py +++ b/src/cloudflare/resources/radar/ranking/ranking.py @@ -31,9 +31,7 @@ ) from ...._wrappers import ResultWrapper from ....types.radar import ranking_top_params, ranking_timeseries_groups_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.ranking_top_response import RankingTopResponse from ....types.radar.ranking_timeseries_groups_response import RankingTimeseriesGroupsResponse diff --git a/src/cloudflare/resources/radar/search.py b/src/cloudflare/resources/radar/search.py index d355e6deb96..18cb4de529c 100644 --- a/src/cloudflare/resources/radar/search.py +++ b/src/cloudflare/resources/radar/search.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.radar import search_global_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.radar.search_global_response import SearchGlobalResponse __all__ = ["SearchResource", "AsyncSearchResource"] diff --git a/src/cloudflare/resources/radar/traffic_anomalies/locations.py b/src/cloudflare/resources/radar/traffic_anomalies/locations.py index 2ddaf9f649d..9acfecc4ed8 100644 --- a/src/cloudflare/resources/radar/traffic_anomalies/locations.py +++ b/src/cloudflare/resources/radar/traffic_anomalies/locations.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.traffic_anomalies import location_get_params from ....types.radar.traffic_anomalies.location_get_response import LocationGetResponse diff --git a/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py b/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py index 9c799ae0bd1..3060a34f7ec 100644 --- a/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py +++ b/src/cloudflare/resources/radar/traffic_anomalies/traffic_anomalies.py @@ -31,9 +31,7 @@ ) from ...._wrappers import ResultWrapper from ....types.radar import traffic_anomaly_get_params -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.traffic_anomaly_get_response import TrafficAnomalyGetResponse __all__ = ["TrafficAnomaliesResource", "AsyncTrafficAnomaliesResource"] diff --git a/src/cloudflare/resources/radar/verified_bots/top.py b/src/cloudflare/resources/radar/verified_bots/top.py index 49c31318770..86e94bb809e 100644 --- a/src/cloudflare/resources/radar/verified_bots/top.py +++ b/src/cloudflare/resources/radar/verified_bots/top.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.radar.verified_bots import top_bots_params, top_categories_params from ....types.radar.verified_bots.top_bots_response import TopBotsResponse from ....types.radar.verified_bots.top_categories_response import TopCategoriesResponse diff --git a/src/cloudflare/resources/rate_limits.py b/src/cloudflare/resources/rate_limits.py index 37c05e4d0ac..f7808df1006 100644 --- a/src/cloudflare/resources/rate_limits.py +++ b/src/cloudflare/resources/rate_limits.py @@ -22,10 +22,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.rate_limits import rate_limit_edit_params, rate_limit_list_params, rate_limit_create_params from ..types.rate_limits.rate_limit import RateLimit from ..types.rate_limits.rate_limit_get_response import RateLimitGetResponse diff --git a/src/cloudflare/resources/rate_plans.py b/src/cloudflare/resources/rate_plans.py index 3c90903292e..76a97e6d87e 100644 --- a/src/cloudflare/resources/rate_plans.py +++ b/src/cloudflare/resources/rate_plans.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.rate_plans.rate_plan_get_response import RatePlanGetResponse __all__ = ["RatePlansResource", "AsyncRatePlansResource"] diff --git a/src/cloudflare/resources/registrar/domains.py b/src/cloudflare/resources/registrar/domains.py index 2dc5c9955fc..b75018f5fd2 100644 --- a/src/cloudflare/resources/registrar/domains.py +++ b/src/cloudflare/resources/registrar/domains.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.registrar import domain_update_params from ...types.registrar.domain import Domain from ...types.registrar.domain_get_response import DomainGetResponse diff --git a/src/cloudflare/resources/request_tracers/traces.py b/src/cloudflare/resources/request_tracers/traces.py index 55f4b1ea22a..9934896d0a6 100644 --- a/src/cloudflare/resources/request_tracers/traces.py +++ b/src/cloudflare/resources/request_tracers/traces.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.request_tracers import trace_create_params from ...types.request_tracers.trace_create_response import TraceCreateResponse diff --git a/src/cloudflare/resources/rules/lists/bulk_operations.py b/src/cloudflare/resources/rules/lists/bulk_operations.py index b1c7f0b3399..2eb9982373c 100644 --- a/src/cloudflare/resources/rules/lists/bulk_operations.py +++ b/src/cloudflare/resources/rules/lists/bulk_operations.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.rules.lists.bulk_operation_get_response import BulkOperationGetResponse __all__ = ["BulkOperationsResource", "AsyncBulkOperationsResource"] diff --git a/src/cloudflare/resources/rules/lists/items.py b/src/cloudflare/resources/rules/lists/items.py index 7e101796486..ffa94113ad1 100644 --- a/src/cloudflare/resources/rules/lists/items.py +++ b/src/cloudflare/resources/rules/lists/items.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncCursorPagination, AsyncCursorPagination -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.rules.lists import item_list_params, item_create_params, item_update_params from ....types.rules.lists.item_get_response import ItemGetResponse from ....types.rules.lists.item_create_response import ItemCreateResponse diff --git a/src/cloudflare/resources/rules/lists/lists.py b/src/cloudflare/resources/rules/lists/lists.py index 31f16742c7d..6b5bf038661 100644 --- a/src/cloudflare/resources/rules/lists/lists.py +++ b/src/cloudflare/resources/rules/lists/lists.py @@ -31,10 +31,7 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.rules import list_create_params, list_update_params -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from .bulk_operations import ( BulkOperationsResource, AsyncBulkOperationsResource, diff --git a/src/cloudflare/resources/rulesets/phases/phases.py b/src/cloudflare/resources/rulesets/phases/phases.py index 9f6a6755eb3..8522d55dc66 100644 --- a/src/cloudflare/resources/rulesets/phases/phases.py +++ b/src/cloudflare/resources/rulesets/phases/phases.py @@ -28,9 +28,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.rulesets import Phase, phase_update_params from ....types.rulesets.phase import Phase from ....types.rulesets.phase_get_response import PhaseGetResponse diff --git a/src/cloudflare/resources/rulesets/phases/versions.py b/src/cloudflare/resources/rulesets/phases/versions.py index 93fbc705d12..77ac256caa0 100644 --- a/src/cloudflare/resources/rulesets/phases/versions.py +++ b/src/cloudflare/resources/rulesets/phases/versions.py @@ -17,10 +17,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.rulesets import Phase from ....types.rulesets.phase import Phase from ....types.rulesets.phases.version_get_response import VersionGetResponse diff --git a/src/cloudflare/resources/rulesets/rules.py b/src/cloudflare/resources/rulesets/rules.py index ecf569b9efa..866e2ec673f 100644 --- a/src/cloudflare/resources/rulesets/rules.py +++ b/src/cloudflare/resources/rulesets/rules.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.rulesets import rule_edit_params, rule_create_params from ...types.rulesets.logging_param import LoggingParam from ...types.rulesets.rule_edit_response import RuleEditResponse diff --git a/src/cloudflare/resources/rulesets/rulesets.py b/src/cloudflare/resources/rulesets/rulesets.py index 7347798d5fd..243a61e9e6b 100644 --- a/src/cloudflare/resources/rulesets/rulesets.py +++ b/src/cloudflare/resources/rulesets/rulesets.py @@ -46,10 +46,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage from .phases.phases import PhasesResource, AsyncPhasesResource -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.rulesets import Kind, Phase, ruleset_create_params, ruleset_update_params from .versions.versions import VersionsResource, AsyncVersionsResource from ...types.rulesets.kind import Kind diff --git a/src/cloudflare/resources/rulesets/versions/by_tag.py b/src/cloudflare/resources/rulesets/versions/by_tag.py index 7bc2877a38d..b08564f4b33 100644 --- a/src/cloudflare/resources/rulesets/versions/by_tag.py +++ b/src/cloudflare/resources/rulesets/versions/by_tag.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.rulesets.versions.by_tag_get_response import ByTagGetResponse __all__ = ["ByTagResource", "AsyncByTagResource"] diff --git a/src/cloudflare/resources/rulesets/versions/versions.py b/src/cloudflare/resources/rulesets/versions/versions.py index d19afd50795..408cc80d4aa 100644 --- a/src/cloudflare/resources/rulesets/versions/versions.py +++ b/src/cloudflare/resources/rulesets/versions/versions.py @@ -25,10 +25,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.rulesets.version_get_response import VersionGetResponse from ....types.rulesets.version_list_response import VersionListResponse diff --git a/src/cloudflare/resources/rum/rules.py b/src/cloudflare/resources/rum/rules.py index f78f37f35bf..799901afab6 100644 --- a/src/cloudflare/resources/rum/rules.py +++ b/src/cloudflare/resources/rum/rules.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.rum import rule_create_params, rule_update_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.rum.rum_rule import RUMRule from ...types.rum.rule_list_response import RuleListResponse from ...types.rum.rule_delete_response import RuleDeleteResponse diff --git a/src/cloudflare/resources/rum/site_info.py b/src/cloudflare/resources/rum/site_info.py index c70c62d4385..51c5e276022 100644 --- a/src/cloudflare/resources/rum/site_info.py +++ b/src/cloudflare/resources/rum/site_info.py @@ -23,10 +23,7 @@ from ..._wrappers import ResultWrapper from ...types.rum import site_info_list_params, site_info_create_params, site_info_update_params from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.rum.site import Site from ...types.rum.site_info_delete_response import SiteInfoDeleteResponse diff --git a/src/cloudflare/resources/secondary_dns/acls.py b/src/cloudflare/resources/secondary_dns/acls.py index ec5c89c6865..9266ddbfe07 100644 --- a/src/cloudflare/resources/secondary_dns/acls.py +++ b/src/cloudflare/resources/secondary_dns/acls.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.secondary_dns import acl_create_params, acl_update_params from ...types.secondary_dns.acl import ACL from ...types.secondary_dns.acl_delete_response import ACLDeleteResponse diff --git a/src/cloudflare/resources/secondary_dns/force_axfr.py b/src/cloudflare/resources/secondary_dns/force_axfr.py index 406f15e5108..a2fb2cc46dd 100644 --- a/src/cloudflare/resources/secondary_dns/force_axfr.py +++ b/src/cloudflare/resources/secondary_dns/force_axfr.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.secondary_dns import force_axfr_create_params from ...types.secondary_dns.force_axfr import ForceAXFR diff --git a/src/cloudflare/resources/secondary_dns/incoming.py b/src/cloudflare/resources/secondary_dns/incoming.py index 1b6e5aa3d6a..ac41746a731 100644 --- a/src/cloudflare/resources/secondary_dns/incoming.py +++ b/src/cloudflare/resources/secondary_dns/incoming.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.secondary_dns import incoming_create_params, incoming_update_params from ...types.secondary_dns.incoming_get_response import IncomingGetResponse from ...types.secondary_dns.incoming_create_response import IncomingCreateResponse diff --git a/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py b/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py index 080b2ce8f1a..8ad56fddf4e 100644 --- a/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py +++ b/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py @@ -28,9 +28,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.secondary_dns import ( outgoing_create_params, outgoing_enable_params, diff --git a/src/cloudflare/resources/secondary_dns/outgoing/status.py b/src/cloudflare/resources/secondary_dns/outgoing/status.py index 6a99e783349..da0505a75ac 100644 --- a/src/cloudflare/resources/secondary_dns/outgoing/status.py +++ b/src/cloudflare/resources/secondary_dns/outgoing/status.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.secondary_dns.enable_transfer import EnableTransfer __all__ = ["StatusResource", "AsyncStatusResource"] diff --git a/src/cloudflare/resources/secondary_dns/peers.py b/src/cloudflare/resources/secondary_dns/peers.py index 843cf963c96..b8f485bcde8 100644 --- a/src/cloudflare/resources/secondary_dns/peers.py +++ b/src/cloudflare/resources/secondary_dns/peers.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.secondary_dns import peer_create_params, peer_update_params from ...types.secondary_dns.peer import Peer from ...types.secondary_dns.peer_delete_response import PeerDeleteResponse diff --git a/src/cloudflare/resources/secondary_dns/tsigs.py b/src/cloudflare/resources/secondary_dns/tsigs.py index 90ba72b0053..6b1caa49fe6 100644 --- a/src/cloudflare/resources/secondary_dns/tsigs.py +++ b/src/cloudflare/resources/secondary_dns/tsigs.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.secondary_dns import tsig_create_params, tsig_update_params from ...types.secondary_dns.tsig import TSIG from ...types.secondary_dns.tsig_delete_response import TSIGDeleteResponse diff --git a/src/cloudflare/resources/snippets/content.py b/src/cloudflare/resources/snippets/content.py index a0b6d8f5a28..562ba2647bd 100644 --- a/src/cloudflare/resources/snippets/content.py +++ b/src/cloudflare/resources/snippets/content.py @@ -17,9 +17,7 @@ async_to_custom_raw_response_wrapper, async_to_custom_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options __all__ = ["ContentResource", "AsyncContentResource"] diff --git a/src/cloudflare/resources/snippets/rules.py b/src/cloudflare/resources/snippets/rules.py index 5405a709a12..71d202e94fd 100644 --- a/src/cloudflare/resources/snippets/rules.py +++ b/src/cloudflare/resources/snippets/rules.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.snippets import rule_update_params from ...types.snippets.rule_list_response import RuleListResponse from ...types.snippets.rule_update_response import RuleUpdateResponse diff --git a/src/cloudflare/resources/snippets/snippets.py b/src/cloudflare/resources/snippets/snippets.py index c669513bdf9..b1633698058 100644 --- a/src/cloudflare/resources/snippets/snippets.py +++ b/src/cloudflare/resources/snippets/snippets.py @@ -37,10 +37,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.snippets import snippet_update_params from ...types.snippets.snippet import Snippet from ...types.snippets.snippet_delete_response import SnippetDeleteResponse diff --git a/src/cloudflare/resources/spectrum/analytics/aggregates/currents.py b/src/cloudflare/resources/spectrum/analytics/aggregates/currents.py index b8a7869260e..2829e3ac981 100644 --- a/src/cloudflare/resources/spectrum/analytics/aggregates/currents.py +++ b/src/cloudflare/resources/spectrum/analytics/aggregates/currents.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.spectrum.analytics.aggregates import current_get_params from .....types.spectrum.analytics.aggregates.current_get_response import CurrentGetResponse diff --git a/src/cloudflare/resources/spectrum/analytics/events/bytimes.py b/src/cloudflare/resources/spectrum/analytics/events/bytimes.py index 81fd0a6f738..19ab3a93512 100644 --- a/src/cloudflare/resources/spectrum/analytics/events/bytimes.py +++ b/src/cloudflare/resources/spectrum/analytics/events/bytimes.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.spectrum.analytics.events import bytime_get_params from .....types.spectrum.analytics.dimension import Dimension from .....types.spectrum.analytics.events.bytime_get_response import BytimeGetResponse diff --git a/src/cloudflare/resources/spectrum/analytics/events/summaries.py b/src/cloudflare/resources/spectrum/analytics/events/summaries.py index 23badfc934c..1b11361a151 100644 --- a/src/cloudflare/resources/spectrum/analytics/events/summaries.py +++ b/src/cloudflare/resources/spectrum/analytics/events/summaries.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.spectrum.analytics.events import summary_get_params from .....types.spectrum.analytics.dimension import Dimension from .....types.spectrum.analytics.events.summary_get_response import SummaryGetResponse diff --git a/src/cloudflare/resources/spectrum/apps.py b/src/cloudflare/resources/spectrum/apps.py index 2d29796de6e..d27fa0e0774 100644 --- a/src/cloudflare/resources/spectrum/apps.py +++ b/src/cloudflare/resources/spectrum/apps.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.spectrum import app_list_params, app_create_params, app_update_params from ...types.spectrum.dns_param import DNSParam from ...types.spectrum.edge_ips_param import EdgeIPsParam diff --git a/src/cloudflare/resources/speed/availabilities.py b/src/cloudflare/resources/speed/availabilities.py index 930d106c8ef..91aff6050d5 100644 --- a/src/cloudflare/resources/speed/availabilities.py +++ b/src/cloudflare/resources/speed/availabilities.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.speed.availability import Availability __all__ = ["AvailabilitiesResource", "AsyncAvailabilitiesResource"] diff --git a/src/cloudflare/resources/speed/pages/pages.py b/src/cloudflare/resources/speed/pages/pages.py index 7eab8c6dcf9..26f747222f6 100644 --- a/src/cloudflare/resources/speed/pages/pages.py +++ b/src/cloudflare/resources/speed/pages/pages.py @@ -32,10 +32,7 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.speed import page_trend_params -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.speed.trend import Trend from ....types.speed.page_list_response import PageListResponse diff --git a/src/cloudflare/resources/speed/pages/tests.py b/src/cloudflare/resources/speed/pages/tests.py index 20a1a66f7af..d8d7c846c1b 100644 --- a/src/cloudflare/resources/speed/pages/tests.py +++ b/src/cloudflare/resources/speed/pages/tests.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.speed.pages import test_list_params, test_create_params, test_delete_params from ....types.speed.pages.test import Test from ....types.speed.pages.test_list_response import TestListResponse diff --git a/src/cloudflare/resources/speed/schedule.py b/src/cloudflare/resources/speed/schedule.py index 1bc4cdf214a..55c89ed3389 100644 --- a/src/cloudflare/resources/speed/schedule.py +++ b/src/cloudflare/resources/speed/schedule.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.speed import schedule_get_params, schedule_create_params, schedule_delete_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.speed.schedule import Schedule from ...types.speed.schedule_create_response import ScheduleCreateResponse from ...types.speed.schedule_delete_response import ScheduleDeleteResponse diff --git a/src/cloudflare/resources/ssl/analyze.py b/src/cloudflare/resources/ssl/analyze.py index 7736fb778a3..2396db10045 100644 --- a/src/cloudflare/resources/ssl/analyze.py +++ b/src/cloudflare/resources/ssl/analyze.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.ssl import analyze_create_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.custom_hostnames import BundleMethod from ...types.ssl.analyze_create_response import AnalyzeCreateResponse from ...types.custom_hostnames.bundle_method import BundleMethod diff --git a/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py b/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py index b1d841e10ca..af6eb2e0c63 100644 --- a/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py +++ b/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py @@ -39,10 +39,7 @@ from ...._wrappers import ResultWrapper from ....types.ssl import certificate_pack_edit_params, certificate_pack_list_params from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.ssl.certificate_pack_get_response import CertificatePackGetResponse from ....types.ssl.certificate_pack_edit_response import CertificatePackEditResponse from ....types.ssl.certificate_pack_delete_response import CertificatePackDeleteResponse diff --git a/src/cloudflare/resources/ssl/certificate_packs/order.py b/src/cloudflare/resources/ssl/certificate_packs/order.py index 2f1e7e4e871..9c9079cf17d 100644 --- a/src/cloudflare/resources/ssl/certificate_packs/order.py +++ b/src/cloudflare/resources/ssl/certificate_packs/order.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.ssl.host import Host from ....types.ssl.certificate_packs import order_create_params from ....types.ssl.certificate_packs.order_create_response import OrderCreateResponse diff --git a/src/cloudflare/resources/ssl/certificate_packs/quota.py b/src/cloudflare/resources/ssl/certificate_packs/quota.py index c641a1906e8..c9a985900f6 100644 --- a/src/cloudflare/resources/ssl/certificate_packs/quota.py +++ b/src/cloudflare/resources/ssl/certificate_packs/quota.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.ssl.certificate_packs.quota_get_response import QuotaGetResponse __all__ = ["QuotaResource", "AsyncQuotaResource"] diff --git a/src/cloudflare/resources/ssl/recommendations.py b/src/cloudflare/resources/ssl/recommendations.py index c94199658f6..b66214bd700 100644 --- a/src/cloudflare/resources/ssl/recommendations.py +++ b/src/cloudflare/resources/ssl/recommendations.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.ssl.recommendation_get_response import RecommendationGetResponse __all__ = ["RecommendationsResource", "AsyncRecommendationsResource"] diff --git a/src/cloudflare/resources/ssl/universal/settings.py b/src/cloudflare/resources/ssl/universal/settings.py index b50248a086a..a595d0c0d46 100644 --- a/src/cloudflare/resources/ssl/universal/settings.py +++ b/src/cloudflare/resources/ssl/universal/settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.ssl.universal import setting_edit_params from ....types.ssl.universal.universal_ssl_settings import UniversalSSLSettings diff --git a/src/cloudflare/resources/ssl/verification.py b/src/cloudflare/resources/ssl/verification.py index 832d313ec8b..6c5f9e0da7a 100644 --- a/src/cloudflare/resources/ssl/verification.py +++ b/src/cloudflare/resources/ssl/verification.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.ssl import verification_get_params, verification_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.ssl.verification_get_response import VerificationGetResponse from ...types.ssl.verification_edit_response import VerificationEditResponse diff --git a/src/cloudflare/resources/storage/analytics.py b/src/cloudflare/resources/storage/analytics.py index dfef4b35536..fa6849c8620 100644 --- a/src/cloudflare/resources/storage/analytics.py +++ b/src/cloudflare/resources/storage/analytics.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.storage import analytics_list_params, analytics_stored_params from ...types.storage.schema import Schema from ...types.storage.components import Components diff --git a/src/cloudflare/resources/stream/audio_tracks.py b/src/cloudflare/resources/stream/audio_tracks.py index 5d61f6567e7..9f62246419c 100644 --- a/src/cloudflare/resources/stream/audio_tracks.py +++ b/src/cloudflare/resources/stream/audio_tracks.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import audio_track_copy_params, audio_track_edit_params from ...types.stream.audio import Audio from ...types.stream.audio_track_get_response import AudioTrackGetResponse diff --git a/src/cloudflare/resources/stream/captions/captions.py b/src/cloudflare/resources/stream/captions/captions.py index 516845ba8d0..c677efa56fd 100644 --- a/src/cloudflare/resources/stream/captions/captions.py +++ b/src/cloudflare/resources/stream/captions/captions.py @@ -24,9 +24,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from .language.language import LanguageResource, AsyncLanguageResource from ....types.stream.caption_get_response import CaptionGetResponse diff --git a/src/cloudflare/resources/stream/captions/language/language.py b/src/cloudflare/resources/stream/captions/language/language.py index 84bd7050dee..d14623d3ff0 100644 --- a/src/cloudflare/resources/stream/captions/language/language.py +++ b/src/cloudflare/resources/stream/captions/language/language.py @@ -28,9 +28,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.stream.caption import Caption from .....types.stream.captions import language_update_params from .....types.stream.captions.language_delete_response import LanguageDeleteResponse diff --git a/src/cloudflare/resources/stream/captions/language/vtt.py b/src/cloudflare/resources/stream/captions/language/vtt.py index 3136e929c75..2d9bc01af2a 100644 --- a/src/cloudflare/resources/stream/captions/language/vtt.py +++ b/src/cloudflare/resources/stream/captions/language/vtt.py @@ -13,9 +13,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options __all__ = ["VttResource", "AsyncVttResource"] diff --git a/src/cloudflare/resources/stream/clip.py b/src/cloudflare/resources/stream/clip.py index 9c34d5ab4aa..f7cfef075ae 100644 --- a/src/cloudflare/resources/stream/clip.py +++ b/src/cloudflare/resources/stream/clip.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import clip_create_params from ...types.stream.clip import Clip from ...types.stream.allowed_origins import AllowedOrigins diff --git a/src/cloudflare/resources/stream/copy.py b/src/cloudflare/resources/stream/copy.py index e6b85f79d95..ba3e519005d 100644 --- a/src/cloudflare/resources/stream/copy.py +++ b/src/cloudflare/resources/stream/copy.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import copy_create_params from ...types.stream.video import Video from ...types.stream.allowed_origins import AllowedOrigins diff --git a/src/cloudflare/resources/stream/direct_upload.py b/src/cloudflare/resources/stream/direct_upload.py index efa26368eeb..774c9b4ce11 100644 --- a/src/cloudflare/resources/stream/direct_upload.py +++ b/src/cloudflare/resources/stream/direct_upload.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import direct_upload_create_params from ...types.stream.allowed_origins import AllowedOrigins from ...types.stream.direct_upload_create_response import DirectUploadCreateResponse diff --git a/src/cloudflare/resources/stream/downloads.py b/src/cloudflare/resources/stream/downloads.py index 531b646b1bc..77a98568ce5 100644 --- a/src/cloudflare/resources/stream/downloads.py +++ b/src/cloudflare/resources/stream/downloads.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import download_create_params from ...types.stream.download_get_response import DownloadGetResponse from ...types.stream.download_create_response import DownloadCreateResponse diff --git a/src/cloudflare/resources/stream/embed.py b/src/cloudflare/resources/stream/embed.py index 4f1dc61f770..f63b5db6f43 100644 --- a/src/cloudflare/resources/stream/embed.py +++ b/src/cloudflare/resources/stream/embed.py @@ -13,9 +13,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options __all__ = ["EmbedResource", "AsyncEmbedResource"] diff --git a/src/cloudflare/resources/stream/keys.py b/src/cloudflare/resources/stream/keys.py index dee3531fb43..2c915fc8e2f 100644 --- a/src/cloudflare/resources/stream/keys.py +++ b/src/cloudflare/resources/stream/keys.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import key_create_params from ...types.stream.keys import Keys from ...types.stream.key_get_response import KeyGetResponse diff --git a/src/cloudflare/resources/stream/live_inputs/live_inputs.py b/src/cloudflare/resources/stream/live_inputs/live_inputs.py index 442706aab62..1bf4fe3446d 100644 --- a/src/cloudflare/resources/stream/live_inputs/live_inputs.py +++ b/src/cloudflare/resources/stream/live_inputs/live_inputs.py @@ -28,9 +28,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.stream import live_input_list_params, live_input_create_params, live_input_update_params from ....types.stream.live_input import LiveInput from ....types.stream.live_input_list_response import LiveInputListResponse diff --git a/src/cloudflare/resources/stream/live_inputs/outputs.py b/src/cloudflare/resources/stream/live_inputs/outputs.py index af1464d04a7..ef72ec551ff 100644 --- a/src/cloudflare/resources/stream/live_inputs/outputs.py +++ b/src/cloudflare/resources/stream/live_inputs/outputs.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.stream.live_inputs import output_create_params, output_update_params from ....types.stream.live_inputs.output import Output diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py index 5c7449705e8..ce47eef83bc 100644 --- a/src/cloudflare/resources/stream/stream.py +++ b/src/cloudflare/resources/stream/stream.py @@ -128,10 +128,7 @@ DirectUploadResourceWithStreamingResponse, AsyncDirectUploadResourceWithStreamingResponse, ) -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.stream import stream_list_params, stream_create_params from .captions.captions import CaptionsResource, AsyncCaptionsResource from ...types.stream.video import Video diff --git a/src/cloudflare/resources/stream/token.py b/src/cloudflare/resources/stream/token.py index c52d130dd39..1a4d637d5ea 100644 --- a/src/cloudflare/resources/stream/token.py +++ b/src/cloudflare/resources/stream/token.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import token_create_params from ...types.stream.token_create_response import TokenCreateResponse diff --git a/src/cloudflare/resources/stream/videos.py b/src/cloudflare/resources/stream/videos.py index f8ccd3c97a5..a1dcd2db874 100644 --- a/src/cloudflare/resources/stream/videos.py +++ b/src/cloudflare/resources/stream/videos.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import video_storage_usage_params from ...types.stream.video_storage_usage_response import VideoStorageUsageResponse diff --git a/src/cloudflare/resources/stream/watermarks.py b/src/cloudflare/resources/stream/watermarks.py index b071f3a8237..73ff089d577 100644 --- a/src/cloudflare/resources/stream/watermarks.py +++ b/src/cloudflare/resources/stream/watermarks.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.stream import watermark_create_params from ...types.stream.watermark import Watermark from ...types.stream.watermark_delete_response import WatermarkDeleteResponse diff --git a/src/cloudflare/resources/stream/webhooks.py b/src/cloudflare/resources/stream/webhooks.py index 2f3879b43c1..174fdbe1f2f 100644 --- a/src/cloudflare/resources/stream/webhooks.py +++ b/src/cloudflare/resources/stream/webhooks.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.stream import webhook_update_params from ...types.stream.webhook_get_response import WebhookGetResponse from ...types.stream.webhook_delete_response import WebhookDeleteResponse diff --git a/src/cloudflare/resources/subscriptions.py b/src/cloudflare/resources/subscriptions.py index 2d30e1af043..7bde4c878d3 100644 --- a/src/cloudflare/resources/subscriptions.py +++ b/src/cloudflare/resources/subscriptions.py @@ -22,10 +22,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncSinglePage, AsyncSinglePage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.subscriptions import subscription_create_params, subscription_update_params from ..types.user.subscription import Subscription from ..types.user.rate_plan_param import RatePlanParam diff --git a/src/cloudflare/resources/url_normalization.py b/src/cloudflare/resources/url_normalization.py index 3ec4291906e..6fc393df1ae 100644 --- a/src/cloudflare/resources/url_normalization.py +++ b/src/cloudflare/resources/url_normalization.py @@ -17,9 +17,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.url_normalization import url_normalization_update_params from ..types.url_normalization.url_normalization_get_response import URLNormalizationGetResponse from ..types.url_normalization.url_normalization_update_response import URLNormalizationUpdateResponse diff --git a/src/cloudflare/resources/url_scanner/scans.py b/src/cloudflare/resources/url_scanner/scans.py index 54764c566f1..36fe07465c1 100644 --- a/src/cloudflare/resources/url_scanner/scans.py +++ b/src/cloudflare/resources/url_scanner/scans.py @@ -29,9 +29,7 @@ async_to_custom_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options 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 diff --git a/src/cloudflare/resources/url_scanner/url_scanner.py b/src/cloudflare/resources/url_scanner/url_scanner.py index 92707d1f132..de67cb75970 100644 --- a/src/cloudflare/resources/url_scanner/url_scanner.py +++ b/src/cloudflare/resources/url_scanner/url_scanner.py @@ -29,9 +29,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.url_scanner import url_scanner_scan_params from ...types.url_scanner.url_scanner_scan_response import URLScannerScanResponse diff --git a/src/cloudflare/resources/user/audit_logs.py b/src/cloudflare/resources/user/audit_logs.py index 6699c4aef11..6c01a9f3612 100644 --- a/src/cloudflare/resources/user/audit_logs.py +++ b/src/cloudflare/resources/user/audit_logs.py @@ -20,10 +20,7 @@ ) from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...types.user import audit_log_list_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.shared.audit_log import AuditLog __all__ = ["AuditLogsResource", "AsyncAuditLogsResource"] diff --git a/src/cloudflare/resources/user/billing/history.py b/src/cloudflare/resources/user/billing/history.py index 538d34c5186..7f102ac237e 100644 --- a/src/cloudflare/resources/user/billing/history.py +++ b/src/cloudflare/resources/user/billing/history.py @@ -19,10 +19,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.user.billing import history_list_params from ....types.user.billing.billing_history import BillingHistory diff --git a/src/cloudflare/resources/user/billing/profile.py b/src/cloudflare/resources/user/billing/profile.py index 1a12d11902a..3956a2cb1e0 100644 --- a/src/cloudflare/resources/user/billing/profile.py +++ b/src/cloudflare/resources/user/billing/profile.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.user.billing.profile_get_response import ProfileGetResponse __all__ = ["ProfileResource", "AsyncProfileResource"] diff --git a/src/cloudflare/resources/user/invites.py b/src/cloudflare/resources/user/invites.py index 84d658ed708..51522de111d 100644 --- a/src/cloudflare/resources/user/invites.py +++ b/src/cloudflare/resources/user/invites.py @@ -23,10 +23,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.user import invite_edit_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.user.invite import Invite __all__ = ["InvitesResource", "AsyncInvitesResource"] diff --git a/src/cloudflare/resources/user/organizations.py b/src/cloudflare/resources/user/organizations.py index be94b8acb6a..6024fd116ec 100644 --- a/src/cloudflare/resources/user/organizations.py +++ b/src/cloudflare/resources/user/organizations.py @@ -20,10 +20,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...types.user import organization_list_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.user.organization import Organization from ...types.user.organization_delete_response import OrganizationDeleteResponse diff --git a/src/cloudflare/resources/user/subscriptions.py b/src/cloudflare/resources/user/subscriptions.py index 9c2405a54ea..11657a0b01e 100644 --- a/src/cloudflare/resources/user/subscriptions.py +++ b/src/cloudflare/resources/user/subscriptions.py @@ -22,9 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...types.user import subscription_edit_params, subscription_update_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.user.rate_plan_param import RatePlanParam from ...types.user.subscription_zone_param import SubscriptionZoneParam from ...types.user.subscription_get_response import SubscriptionGetResponse diff --git a/src/cloudflare/resources/user/tokens/permission_groups.py b/src/cloudflare/resources/user/tokens/permission_groups.py index 28efd8ca0e4..2a9cc0d5fda 100644 --- a/src/cloudflare/resources/user/tokens/permission_groups.py +++ b/src/cloudflare/resources/user/tokens/permission_groups.py @@ -14,10 +14,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options __all__ = ["PermissionGroupsResource", "AsyncPermissionGroupsResource"] diff --git a/src/cloudflare/resources/user/tokens/tokens.py b/src/cloudflare/resources/user/tokens/tokens.py index 877a4388e81..16c141b6a72 100644 --- a/src/cloudflare/resources/user/tokens/tokens.py +++ b/src/cloudflare/resources/user/tokens/tokens.py @@ -32,10 +32,7 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ....types.user import token_list_params, token_create_params, token_update_params -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from .permission_groups import ( PermissionGroupsResource, AsyncPermissionGroupsResource, diff --git a/src/cloudflare/resources/user/tokens/value.py b/src/cloudflare/resources/user/tokens/value.py index 90195f2c4d2..7f2c8244596 100644 --- a/src/cloudflare/resources/user/tokens/value.py +++ b/src/cloudflare/resources/user/tokens/value.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.user.tokens import value_update_params from ....types.user.tokens.value import Value diff --git a/src/cloudflare/resources/user/user.py b/src/cloudflare/resources/user/user.py index 083b24efdb0..cd85bfe6a6e 100644 --- a/src/cloudflare/resources/user/user.py +++ b/src/cloudflare/resources/user/user.py @@ -70,9 +70,7 @@ AsyncSubscriptionsResourceWithStreamingResponse, ) from .tokens.tokens import TokensResource, AsyncTokensResource -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from .billing.billing import BillingResource, AsyncBillingResource __all__ = ["UserResource", "AsyncUserResource"] diff --git a/src/cloudflare/resources/vectorize/indexes.py b/src/cloudflare/resources/vectorize/indexes.py index fb9cdaeb7f0..4f1775fdb3e 100644 --- a/src/cloudflare/resources/vectorize/indexes.py +++ b/src/cloudflare/resources/vectorize/indexes.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.vectorize import ( index_query_params, index_create_params, diff --git a/src/cloudflare/resources/waiting_rooms/events/details.py b/src/cloudflare/resources/waiting_rooms/events/details.py index 4e99504cb01..4496d35d42f 100644 --- a/src/cloudflare/resources/waiting_rooms/events/details.py +++ b/src/cloudflare/resources/waiting_rooms/events/details.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.waiting_rooms.events.detail_get_response import DetailGetResponse __all__ = ["DetailsResource", "AsyncDetailsResource"] diff --git a/src/cloudflare/resources/waiting_rooms/events/events.py b/src/cloudflare/resources/waiting_rooms/events/events.py index 2c4a3998a86..f070f985934 100644 --- a/src/cloudflare/resources/waiting_rooms/events/events.py +++ b/src/cloudflare/resources/waiting_rooms/events/events.py @@ -29,10 +29,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.waiting_rooms import event_edit_params, event_list_params, event_create_params, event_update_params from ....types.waiting_rooms.event import Event from ....types.waiting_rooms.event_delete_response import EventDeleteResponse diff --git a/src/cloudflare/resources/waiting_rooms/page.py b/src/cloudflare/resources/waiting_rooms/page.py index f8d511a8d16..e77b2a77148 100644 --- a/src/cloudflare/resources/waiting_rooms/page.py +++ b/src/cloudflare/resources/waiting_rooms/page.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.waiting_rooms import page_preview_params from ...types.waiting_rooms.page_preview_response import PagePreviewResponse diff --git a/src/cloudflare/resources/waiting_rooms/rules.py b/src/cloudflare/resources/waiting_rooms/rules.py index ca249b40fc6..03de4d31c7c 100644 --- a/src/cloudflare/resources/waiting_rooms/rules.py +++ b/src/cloudflare/resources/waiting_rooms/rules.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.waiting_rooms import rule_edit_params, rule_create_params, rule_update_params from ...types.waiting_rooms.waiting_room_rule import WaitingRoomRule from ...types.waiting_rooms.rule_edit_response import RuleEditResponse diff --git a/src/cloudflare/resources/waiting_rooms/settings.py b/src/cloudflare/resources/waiting_rooms/settings.py index 2c793777bc2..b3cc49bc001 100644 --- a/src/cloudflare/resources/waiting_rooms/settings.py +++ b/src/cloudflare/resources/waiting_rooms/settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.waiting_rooms import setting_edit_params, setting_update_params from ...types.waiting_rooms.setting_get_response import SettingGetResponse from ...types.waiting_rooms.setting_edit_response import SettingEditResponse diff --git a/src/cloudflare/resources/waiting_rooms/statuses.py b/src/cloudflare/resources/waiting_rooms/statuses.py index 81dc369cb7f..c09b4a8e29b 100644 --- a/src/cloudflare/resources/waiting_rooms/statuses.py +++ b/src/cloudflare/resources/waiting_rooms/statuses.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.waiting_rooms.status_get_response import StatusGetResponse __all__ = ["StatusesResource", "AsyncStatusesResource"] diff --git a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py index 70d9b6d225d..d2913dc2f93 100644 --- a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py +++ b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py @@ -63,10 +63,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage from .events.events import EventsResource, AsyncEventsResource -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.waiting_rooms import ( waiting_room_edit_params, waiting_room_list_params, diff --git a/src/cloudflare/resources/warp_connector.py b/src/cloudflare/resources/warp_connector.py index b2df61979db..0e97bf21e8f 100644 --- a/src/cloudflare/resources/warp_connector.py +++ b/src/cloudflare/resources/warp_connector.py @@ -23,10 +23,7 @@ ) from .._wrappers import ResultWrapper from ..pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.warp_connector import warp_connector_edit_params, warp_connector_list_params, warp_connector_create_params from ..types.warp_connector.warp_connector_get_response import WARPConnectorGetResponse from ..types.warp_connector.warp_connector_edit_response import WARPConnectorEditResponse diff --git a/src/cloudflare/resources/web3/hostnames/hostnames.py b/src/cloudflare/resources/web3/hostnames/hostnames.py index 9bf5ac86e9a..f0d2e53f58a 100644 --- a/src/cloudflare/resources/web3/hostnames/hostnames.py +++ b/src/cloudflare/resources/web3/hostnames/hostnames.py @@ -23,10 +23,7 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.web3 import hostname_edit_params, hostname_create_params -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from .ipfs_universal_paths import ( IPFSUniversalPathsResource, AsyncIPFSUniversalPathsResource, diff --git a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py index d8c028bfc32..3230e01fe76 100644 --- a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py +++ b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py @@ -29,9 +29,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.web3.hostnames.ipfs_universal_paths import content_list_update_params from ......types.web3.hostnames.ipfs_universal_paths.content_list import ContentList diff --git a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py index 4170fac51c8..488eaacca22 100644 --- a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py +++ b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.web3.hostnames.ipfs_universal_paths.content_lists import entry_create_params, entry_update_params from ......types.web3.hostnames.ipfs_universal_paths.content_lists.entry_get_response import EntryGetResponse from ......types.web3.hostnames.ipfs_universal_paths.content_lists.entry_list_response import EntryListResponse diff --git a/src/cloudflare/resources/workers/account_settings.py b/src/cloudflare/resources/workers/account_settings.py index ed3dea6115c..eb77cdd8b01 100644 --- a/src/cloudflare/resources/workers/account_settings.py +++ b/src/cloudflare/resources/workers/account_settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.workers import account_setting_update_params from ...types.workers.account_setting_get_response import AccountSettingGetResponse from ...types.workers.account_setting_update_response import AccountSettingUpdateResponse diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index d2ee0cb1b99..df82885c0b8 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -30,9 +30,7 @@ ) from ...._wrappers import ResultWrapper from .models.models import ModelsResource, AsyncModelsResource -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.workers import ai_run_params from ....types.workers.ai_run_response import AIRunResponse diff --git a/src/cloudflare/resources/workers/ai/models/schema.py b/src/cloudflare/resources/workers/ai/models/schema.py index 934b517b989..7d5d6c3157c 100644 --- a/src/cloudflare/resources/workers/ai/models/schema.py +++ b/src/cloudflare/resources/workers/ai/models/schema.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.workers.ai.models import schema_get_params __all__ = ["SchemaResource", "AsyncSchemaResource"] diff --git a/src/cloudflare/resources/workers/domains.py b/src/cloudflare/resources/workers/domains.py index 1ef08b0f762..94a2b626e43 100644 --- a/src/cloudflare/resources/workers/domains.py +++ b/src/cloudflare/resources/workers/domains.py @@ -21,10 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.workers import domain_list_params, domain_update_params from ...types.workers.domain import Domain diff --git a/src/cloudflare/resources/workers/scripts/content.py b/src/cloudflare/resources/workers/scripts/content.py index 7defff75eb2..b57cdfddbf3 100644 --- a/src/cloudflare/resources/workers/scripts/content.py +++ b/src/cloudflare/resources/workers/scripts/content.py @@ -31,9 +31,7 @@ async_to_custom_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.workers.script import Script from ....types.workers.scripts import content_update_params from ....types.workers.worker_metadata_param import WorkerMetadataParam diff --git a/src/cloudflare/resources/workers/scripts/deployments.py b/src/cloudflare/resources/workers/scripts/deployments.py index 25a76d167d7..9361380834f 100644 --- a/src/cloudflare/resources/workers/scripts/deployments.py +++ b/src/cloudflare/resources/workers/scripts/deployments.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.workers.scripts import deployment_create_params from ....types.workers.scripts.deployment_param import DeploymentParam from ....types.workers.scripts.deployment_get_response import DeploymentGetResponse diff --git a/src/cloudflare/resources/workers/scripts/schedules.py b/src/cloudflare/resources/workers/scripts/schedules.py index 229fcc45ebc..467ff03361c 100644 --- a/src/cloudflare/resources/workers/scripts/schedules.py +++ b/src/cloudflare/resources/workers/scripts/schedules.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.workers.scripts import schedule_update_params from ....types.workers.scripts.schedule_get_response import ScheduleGetResponse from ....types.workers.scripts.schedule_update_response import ScheduleUpdateResponse diff --git a/src/cloudflare/resources/workers/scripts/scripts.py b/src/cloudflare/resources/workers/scripts/scripts.py index 4ad655e6f59..5acec054d32 100644 --- a/src/cloudflare/resources/workers/scripts/scripts.py +++ b/src/cloudflare/resources/workers/scripts/scripts.py @@ -78,10 +78,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.workers import script_delete_params, script_update_params from ....types.workers.script import Script diff --git a/src/cloudflare/resources/workers/scripts/settings.py b/src/cloudflare/resources/workers/scripts/settings.py index 0e094f58b04..94c27d833b8 100644 --- a/src/cloudflare/resources/workers/scripts/settings.py +++ b/src/cloudflare/resources/workers/scripts/settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.workers.scripts import setting_edit_params from ....types.workers.script_setting import ScriptSetting from ....types.workers.scripts.consumer_script_param import ConsumerScriptParam diff --git a/src/cloudflare/resources/workers/scripts/tail.py b/src/cloudflare/resources/workers/scripts/tail.py index b5f293be35c..54e69baa851 100644 --- a/src/cloudflare/resources/workers/scripts/tail.py +++ b/src/cloudflare/resources/workers/scripts/tail.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.workers.scripts import tail_create_params from ....types.workers.scripts.tail_get_response import TailGetResponse from ....types.workers.scripts.tail_create_response import TailCreateResponse diff --git a/src/cloudflare/resources/workers/scripts/versions.py b/src/cloudflare/resources/workers/scripts/versions.py index baaeb73a4dc..1009f860beb 100644 --- a/src/cloudflare/resources/workers/scripts/versions.py +++ b/src/cloudflare/resources/workers/scripts/versions.py @@ -23,10 +23,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePagination, AsyncV4PagePagination -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.workers.scripts import version_list_params, version_create_params from ....types.workers.scripts.version_get_response import VersionGetResponse from ....types.workers.scripts.version_list_response import VersionListResponse diff --git a/src/cloudflare/resources/workers/subdomains.py b/src/cloudflare/resources/workers/subdomains.py index de75ee895ef..8f12044d729 100644 --- a/src/cloudflare/resources/workers/subdomains.py +++ b/src/cloudflare/resources/workers/subdomains.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.workers import subdomain_update_params from ...types.workers.subdomain_get_response import SubdomainGetResponse from ...types.workers.subdomain_update_response import SubdomainUpdateResponse diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py index b986e638da3..efde6e33c5e 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py @@ -30,10 +30,7 @@ from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage from .scripts.scripts import ScriptsResource, AsyncScriptsResource -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.workers_for_platforms.dispatch import namespace_create_params from .....types.workers_for_platforms.dispatch.namespace_get_response import NamespaceGetResponse from .....types.workers_for_platforms.dispatch.namespace_list_response import NamespaceListResponse diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py index d2cc4084bc3..ae29996783a 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.workers_for_platforms.dispatch.namespaces.scripts.binding_get_response import BindingGetResponse __all__ = ["BindingsResource", "AsyncBindingsResource"] 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 6a75cb6148c..c5159e84730 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 @@ -31,9 +31,7 @@ async_to_custom_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.workers.script import Script from ......types.workers.worker_metadata_param import WorkerMetadataParam from ......types.workers_for_platforms.dispatch.namespaces.scripts import content_update_params diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py index 82979ddf8ce..9adb223b2c7 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py @@ -61,9 +61,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.workers.script import Script as WorkersScript from ......types.workers_for_platforms.dispatch.namespaces import script_delete_params, script_update_params from ......types.workers_for_platforms.dispatch.namespaces.script import Script as NamespacesScript diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/secrets.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/secrets.py index ba851e673be..4cb8f6ce11e 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/secrets.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/secrets.py @@ -22,10 +22,7 @@ ) from ......_wrappers import ResultWrapper from ......pagination import SyncSinglePage, AsyncSinglePage -from ......_base_client import ( - AsyncPaginator, - make_request_options, -) +from ......_base_client import AsyncPaginator, make_request_options from ......types.workers_for_platforms.dispatch.namespaces.scripts import secret_update_params from ......types.workers_for_platforms.dispatch.namespaces.scripts.secret_list_response import SecretListResponse from ......types.workers_for_platforms.dispatch.namespaces.scripts.secret_update_response import SecretUpdateResponse diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py index c5454697e9e..58e4b3105eb 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ......_wrappers import ResultWrapper -from ......_base_client import ( - make_request_options, -) +from ......_base_client import make_request_options from ......types.workers_for_platforms.dispatch.namespaces.scripts import setting_edit_params from ......types.workers_for_platforms.dispatch.namespaces.scripts.setting_get_response import SettingGetResponse from ......types.workers_for_platforms.dispatch.namespaces.scripts.setting_edit_response import SettingEditResponse diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/tags.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/tags.py index 3576cecadb9..f96b9d6e7a4 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/tags.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/tags.py @@ -21,10 +21,7 @@ ) from ......_wrappers import ResultWrapper from ......pagination import SyncSinglePage, AsyncSinglePage -from ......_base_client import ( - AsyncPaginator, - make_request_options, -) +from ......_base_client import AsyncPaginator, make_request_options from ......types.workers_for_platforms.dispatch.namespaces.scripts import tag_update_params from ......types.workers_for_platforms.dispatch.namespaces.scripts.tag_list_response import TagListResponse from ......types.workers_for_platforms.dispatch.namespaces.scripts.tag_update_response import TagUpdateResponse diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index 10d54f8e800..15bc2e142ae 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -37,10 +37,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .user_policy_checks import ( UserPolicyChecksResource, AsyncUserPolicyChecksResource, diff --git a/src/cloudflare/resources/zero_trust/access/applications/cas.py b/src/cloudflare/resources/zero_trust/access/applications/cas.py index 6dcc2e9f3d9..e11b49474cd 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/cas.py +++ b/src/cloudflare/resources/zero_trust/access/applications/cas.py @@ -17,10 +17,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.access.applications.ca import CA from .....types.zero_trust.access.applications.ca_get_response import CAGetResponse from .....types.zero_trust.access.applications.ca_create_response import CACreateResponse diff --git a/src/cloudflare/resources/zero_trust/access/applications/policies.py b/src/cloudflare/resources/zero_trust/access/applications/policies.py index bbea31c3736..cdc9b72fdf1 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/policies.py +++ b/src/cloudflare/resources/zero_trust/access/applications/policies.py @@ -21,10 +21,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.access import Decision from .....types.zero_trust.access.decision import Decision from .....types.zero_trust.access_rule_param import AccessRuleParam diff --git a/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py b/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py index 3513a7db218..bcc4fa31662 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py +++ b/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.access.app_id_param import AppIDParam from .....types.zero_trust.access.applications.user_policy_check_list_response import UserPolicyCheckListResponse diff --git a/src/cloudflare/resources/zero_trust/access/bookmarks.py b/src/cloudflare/resources/zero_trust/access/bookmarks.py index f6d07c482c2..38b1802f3d6 100644 --- a/src/cloudflare/resources/zero_trust/access/bookmarks.py +++ b/src/cloudflare/resources/zero_trust/access/bookmarks.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.access import bookmark_create_params, bookmark_update_params from ....types.zero_trust.access.bookmark import Bookmark from ....types.zero_trust.access.bookmark_delete_response import BookmarkDeleteResponse diff --git a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py index 3bcae016b10..6584f895e79 100644 --- a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py +++ b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py @@ -29,10 +29,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.access import certificate_create_params, certificate_update_params from .....types.zero_trust.access.certificate import Certificate from .....types.zero_trust.access.associated_hostnames import AssociatedHostnames diff --git a/src/cloudflare/resources/zero_trust/access/certificates/settings.py b/src/cloudflare/resources/zero_trust/access/certificates/settings.py index b4001aa3cd2..597647546b3 100644 --- a/src/cloudflare/resources/zero_trust/access/certificates/settings.py +++ b/src/cloudflare/resources/zero_trust/access/certificates/settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.access.certificates import setting_update_params from .....types.zero_trust.access.certificates.setting_get_response import SettingGetResponse from .....types.zero_trust.access.certificates.setting_update_response import SettingUpdateResponse diff --git a/src/cloudflare/resources/zero_trust/access/custom_pages.py b/src/cloudflare/resources/zero_trust/access/custom_pages.py index 0bc9c58dd60..b164838d9a2 100644 --- a/src/cloudflare/resources/zero_trust/access/custom_pages.py +++ b/src/cloudflare/resources/zero_trust/access/custom_pages.py @@ -23,10 +23,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.access import custom_page_create_params, custom_page_update_params from ....types.zero_trust.access.custom_page import CustomPage from ....types.zero_trust.access.custom_page_without_html import CustomPageWithoutHTML diff --git a/src/cloudflare/resources/zero_trust/access/groups.py b/src/cloudflare/resources/zero_trust/access/groups.py index 8b9ee6bf716..bb9002a0430 100644 --- a/src/cloudflare/resources/zero_trust/access/groups.py +++ b/src/cloudflare/resources/zero_trust/access/groups.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.access import group_create_params, group_update_params from ....types.zero_trust.access_rule_param import AccessRuleParam from ....types.zero_trust.access.zero_trust_group import ZeroTrustGroup diff --git a/src/cloudflare/resources/zero_trust/access/keys.py b/src/cloudflare/resources/zero_trust/access/keys.py index ac04e6b775d..16b975ff161 100644 --- a/src/cloudflare/resources/zero_trust/access/keys.py +++ b/src/cloudflare/resources/zero_trust/access/keys.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.access import key_update_params from ....types.zero_trust.access.key_get_response import KeyGetResponse from ....types.zero_trust.access.key_rotate_response import KeyRotateResponse diff --git a/src/cloudflare/resources/zero_trust/access/logs/access_requests.py b/src/cloudflare/resources/zero_trust/access/logs/access_requests.py index 64cd98c6c50..8e31f904de6 100644 --- a/src/cloudflare/resources/zero_trust/access/logs/access_requests.py +++ b/src/cloudflare/resources/zero_trust/access/logs/access_requests.py @@ -22,9 +22,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.access.logs import access_request_list_params from .....types.zero_trust.access.logs.access_request_list_response import AccessRequestListResponse diff --git a/src/cloudflare/resources/zero_trust/access/policies.py b/src/cloudflare/resources/zero_trust/access/policies.py index 6cddea86c29..a18331e7aaf 100644 --- a/src/cloudflare/resources/zero_trust/access/policies.py +++ b/src/cloudflare/resources/zero_trust/access/policies.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.access import Decision, policy_create_params, policy_update_params from ....types.zero_trust.access.decision import Decision from ....types.zero_trust.access_rule_param import AccessRuleParam diff --git a/src/cloudflare/resources/zero_trust/access/service_tokens.py b/src/cloudflare/resources/zero_trust/access/service_tokens.py index 066ae6dc2ac..85d275e4b17 100644 --- a/src/cloudflare/resources/zero_trust/access/service_tokens.py +++ b/src/cloudflare/resources/zero_trust/access/service_tokens.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.access import service_token_create_params, service_token_update_params from ....types.zero_trust.access.service_token import ServiceToken from ....types.zero_trust.access.service_token_create_response import ServiceTokenCreateResponse diff --git a/src/cloudflare/resources/zero_trust/access/tags.py b/src/cloudflare/resources/zero_trust/access/tags.py index 91e0a67fddf..62e48d2029f 100644 --- a/src/cloudflare/resources/zero_trust/access/tags.py +++ b/src/cloudflare/resources/zero_trust/access/tags.py @@ -22,10 +22,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.access import tag_create_params, tag_update_params from ....types.zero_trust.access.tag import Tag from ....types.zero_trust.access.tag_delete_response import TagDeleteResponse diff --git a/src/cloudflare/resources/zero_trust/access/users/active_sessions.py b/src/cloudflare/resources/zero_trust/access/users/active_sessions.py index 766bec75c17..a3105005535 100644 --- a/src/cloudflare/resources/zero_trust/access/users/active_sessions.py +++ b/src/cloudflare/resources/zero_trust/access/users/active_sessions.py @@ -17,10 +17,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.access.users.active_session_get_response import ActiveSessionGetResponse from .....types.zero_trust.access.users.active_session_list_response import ActiveSessionListResponse diff --git a/src/cloudflare/resources/zero_trust/access/users/failed_logins.py b/src/cloudflare/resources/zero_trust/access/users/failed_logins.py index 30e2b404147..bf60de4dcf3 100644 --- a/src/cloudflare/resources/zero_trust/access/users/failed_logins.py +++ b/src/cloudflare/resources/zero_trust/access/users/failed_logins.py @@ -14,10 +14,7 @@ async_to_streamed_response_wrapper, ) from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.access.users.failed_login_list_response import FailedLoginListResponse __all__ = ["FailedLoginsResource", "AsyncFailedLoginsResource"] diff --git a/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py b/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py index e1ac12e3aed..9a01ce91203 100644 --- a/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py +++ b/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.access.users.identity import Identity __all__ = ["LastSeenIdentityResource", "AsyncLastSeenIdentityResource"] diff --git a/src/cloudflare/resources/zero_trust/access/users/users.py b/src/cloudflare/resources/zero_trust/access/users/users.py index 9021838eaff..dd6d43cbe3b 100644 --- a/src/cloudflare/resources/zero_trust/access/users/users.py +++ b/src/cloudflare/resources/zero_trust/access/users/users.py @@ -30,10 +30,7 @@ ActiveSessionsResourceWithStreamingResponse, AsyncActiveSessionsResourceWithStreamingResponse, ) -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .last_seen_identity import ( LastSeenIdentityResource, AsyncLastSeenIdentityResource, diff --git a/src/cloudflare/resources/zero_trust/connectivity_settings.py b/src/cloudflare/resources/zero_trust/connectivity_settings.py index 6514c8d16f6..615f43e2d75 100644 --- a/src/cloudflare/resources/zero_trust/connectivity_settings.py +++ b/src/cloudflare/resources/zero_trust/connectivity_settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.zero_trust import connectivity_setting_edit_params from ...types.zero_trust.connectivity_setting_get_response import ConnectivitySettingGetResponse from ...types.zero_trust.connectivity_setting_edit_response import ConnectivitySettingEditResponse diff --git a/src/cloudflare/resources/zero_trust/devices/devices.py b/src/cloudflare/resources/zero_trust/devices/devices.py index 67ff8295c8d..abe17124baa 100644 --- a/src/cloudflare/resources/zero_trust/devices/devices.py +++ b/src/cloudflare/resources/zero_trust/devices/devices.py @@ -81,10 +81,7 @@ OverrideCodesResourceWithStreamingResponse, AsyncOverrideCodesResourceWithStreamingResponse, ) -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from .posture.posture import PostureResource, AsyncPostureResource from .policies.policies import PoliciesResource, AsyncPoliciesResource from ....types.zero_trust.device import Device diff --git a/src/cloudflare/resources/zero_trust/devices/dex_tests.py b/src/cloudflare/resources/zero_trust/devices/dex_tests.py index 63f779e24ad..26c2c033002 100644 --- a/src/cloudflare/resources/zero_trust/devices/dex_tests.py +++ b/src/cloudflare/resources/zero_trust/devices/dex_tests.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.devices import dex_test_create_params, dex_test_update_params from ....types.zero_trust.devices.schema_http import SchemaHTTP from ....types.zero_trust.devices.schema_data_param import SchemaDataParam diff --git a/src/cloudflare/resources/zero_trust/devices/networks.py b/src/cloudflare/resources/zero_trust/devices/networks.py index 32906413a72..c8940c45e89 100644 --- a/src/cloudflare/resources/zero_trust/devices/networks.py +++ b/src/cloudflare/resources/zero_trust/devices/networks.py @@ -22,10 +22,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.devices import network_create_params, network_update_params from ....types.zero_trust.devices.device_network import DeviceNetwork from ....types.zero_trust.devices.network_delete_response import NetworkDeleteResponse diff --git a/src/cloudflare/resources/zero_trust/devices/override_codes.py b/src/cloudflare/resources/zero_trust/devices/override_codes.py index bd6353f2f46..cad19ee9c4c 100644 --- a/src/cloudflare/resources/zero_trust/devices/override_codes.py +++ b/src/cloudflare/resources/zero_trust/devices/override_codes.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.devices.override_code_list_response import OverrideCodeListResponse __all__ = ["OverrideCodesResource", "AsyncOverrideCodesResource"] diff --git a/src/cloudflare/resources/zero_trust/devices/policies/default_policy.py b/src/cloudflare/resources/zero_trust/devices/policies/default_policy.py index b14defafd12..6a19573c0a5 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/default_policy.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/default_policy.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.devices.policies.default_policy_get_response import DefaultPolicyGetResponse __all__ = ["DefaultPolicyResource", "AsyncDefaultPolicyResource"] diff --git a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py index c72143a1b7c..1373338441f 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py @@ -21,10 +21,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.devices.policies import exclude_update_params from .....types.zero_trust.devices.policies.exclude_get_response import ExcludeGetResponse from .....types.zero_trust.devices.policies.split_tunnel_exclude import SplitTunnelExclude diff --git a/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py b/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py index 949d226d832..7e68b29b43d 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py @@ -21,10 +21,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.devices.policies import fallback_domain_update_params from .....types.zero_trust.devices.policies.fallback_domain import FallbackDomain from .....types.zero_trust.devices.policies.fallback_domain_param import FallbackDomainParam diff --git a/src/cloudflare/resources/zero_trust/devices/policies/includes.py b/src/cloudflare/resources/zero_trust/devices/policies/includes.py index ba8b35f0189..6c24a1b0dd4 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/includes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/includes.py @@ -21,10 +21,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.devices.policies import include_update_params from .....types.zero_trust.devices.policies.include_get_response import IncludeGetResponse from .....types.zero_trust.devices.policies.split_tunnel_include import SplitTunnelInclude diff --git a/src/cloudflare/resources/zero_trust/devices/policies/policies.py b/src/cloudflare/resources/zero_trust/devices/policies/policies.py index 93b09dbd3c1..88dce419d10 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/policies.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/policies.py @@ -45,10 +45,7 @@ DefaultPolicyResourceWithStreamingResponse, AsyncDefaultPolicyResourceWithStreamingResponse, ) -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .fallback_domains import ( FallbackDomainsResource, AsyncFallbackDomainsResource, diff --git a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py index c8570f2c642..51b58c57f46 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py @@ -22,10 +22,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.devices.posture import integration_edit_params, integration_create_params from .....types.zero_trust.devices.posture.integration import Integration from .....types.zero_trust.devices.posture.integration_delete_response import IntegrationDeleteResponse diff --git a/src/cloudflare/resources/zero_trust/devices/posture/posture.py b/src/cloudflare/resources/zero_trust/devices/posture/posture.py index 528888f1557..4dceaf7e787 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/posture.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/posture.py @@ -30,10 +30,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.devices import posture_create_params, posture_update_params from .....types.zero_trust.devices.device_input_param import DeviceInputParam from .....types.zero_trust.devices.device_match_param import DeviceMatchParam diff --git a/src/cloudflare/resources/zero_trust/devices/revoke.py b/src/cloudflare/resources/zero_trust/devices/revoke.py index c9a37723494..46093fcfd0d 100644 --- a/src/cloudflare/resources/zero_trust/devices/revoke.py +++ b/src/cloudflare/resources/zero_trust/devices/revoke.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.devices import revoke_create_params from ....types.zero_trust.devices.revoke_create_response import RevokeCreateResponse diff --git a/src/cloudflare/resources/zero_trust/devices/settings.py b/src/cloudflare/resources/zero_trust/devices/settings.py index 0b1ae97a6d8..34d455ca260 100644 --- a/src/cloudflare/resources/zero_trust/devices/settings.py +++ b/src/cloudflare/resources/zero_trust/devices/settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.devices import setting_update_params from ....types.zero_trust.devices.device_settings import DeviceSettings diff --git a/src/cloudflare/resources/zero_trust/devices/unrevoke.py b/src/cloudflare/resources/zero_trust/devices/unrevoke.py index 7a35660c2ef..014c732f987 100644 --- a/src/cloudflare/resources/zero_trust/devices/unrevoke.py +++ b/src/cloudflare/resources/zero_trust/devices/unrevoke.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.devices import unrevoke_create_params from ....types.zero_trust.devices.unrevoke_create_response import UnrevokeCreateResponse diff --git a/src/cloudflare/resources/zero_trust/dex/colos.py b/src/cloudflare/resources/zero_trust/dex/colos.py index 82c072ad419..3fe36f0bd12 100644 --- a/src/cloudflare/resources/zero_trust/dex/colos.py +++ b/src/cloudflare/resources/zero_trust/dex/colos.py @@ -17,10 +17,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.dex import colo_list_params __all__ = ["ColosResource", "AsyncColosResource"] diff --git a/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py b/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py index 1aec99e00cf..6c09c4a5d31 100644 --- a/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py +++ b/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py @@ -17,10 +17,7 @@ async_to_streamed_response_wrapper, ) from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.dex.fleet_status import device_list_params from .....types.zero_trust.dex.fleet_status.device_list_response import DeviceListResponse diff --git a/src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py b/src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py index fd44aab6d52..1633193de67 100644 --- a/src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py +++ b/src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py @@ -28,9 +28,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dex import fleet_status_live_params, fleet_status_over_time_params from .....types.zero_trust.dex.fleet_status_live_response import FleetStatusLiveResponse diff --git a/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py b/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py index efeb1dec67e..4aeb2f1f978 100644 --- a/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py +++ b/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py @@ -29,9 +29,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dex import http_test_get_params from .....types.zero_trust.dex.http_details import HTTPDetails diff --git a/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py b/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py index 3f38cee74f1..183aaf7958e 100644 --- a/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py +++ b/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dex.http_tests import percentile_get_params from .....types.zero_trust.dex.http_tests.http_details_percentiles import HTTPDetailsPercentiles diff --git a/src/cloudflare/resources/zero_trust/dex/tests/tests.py b/src/cloudflare/resources/zero_trust/dex/tests/tests.py index b13668e0746..e99c10c4809 100644 --- a/src/cloudflare/resources/zero_trust/dex/tests/tests.py +++ b/src/cloudflare/resources/zero_trust/dex/tests/tests.py @@ -25,10 +25,7 @@ UniqueDevicesResourceWithStreamingResponse, AsyncUniqueDevicesResourceWithStreamingResponse, ) -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.dex import test_list_params from .....types.zero_trust.dex.test_list_response import TestListResponse diff --git a/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py b/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py index 2f42ec7c808..a17988863a5 100644 --- a/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py +++ b/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dex.tests import unique_device_list_params from .....types.zero_trust.dex.tests.unique_devices import UniqueDevices diff --git a/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py b/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py index 043485044c6..8033766601b 100644 --- a/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py +++ b/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dex.traceroute_test_results.network_path_get_response import NetworkPathGetResponse __all__ = ["NetworkPathResource", "AsyncNetworkPathResource"] diff --git a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py index 865312380a0..b801c55a317 100644 --- a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py +++ b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.dex import ( traceroute_test_get_params, traceroute_test_percentiles_params, diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py index 6cce46a91d7..1c9746e4f2c 100644 --- a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py +++ b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py @@ -29,10 +29,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.dlp import dataset_create_params, dataset_update_params from .....types.zero_trust.dlp.dataset import Dataset from .....types.zero_trust.dlp.dataset_creation import DatasetCreation diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py index ffbd13882e4..5ea625471d3 100644 --- a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py +++ b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dlp.dataset import Dataset from .....types.zero_trust.dlp.datasets import upload_edit_params from .....types.zero_trust.dlp.datasets.new_version import NewVersion diff --git a/src/cloudflare/resources/zero_trust/dlp/patterns.py b/src/cloudflare/resources/zero_trust/dlp/patterns.py index dbf71741b8e..42b0323f7aa 100644 --- a/src/cloudflare/resources/zero_trust/dlp/patterns.py +++ b/src/cloudflare/resources/zero_trust/dlp/patterns.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.dlp import pattern_validate_params from ....types.logpush.ownership_validation import OwnershipValidation diff --git a/src/cloudflare/resources/zero_trust/dlp/payload_logs.py b/src/cloudflare/resources/zero_trust/dlp/payload_logs.py index 6cb2849102c..99083ab5398 100644 --- a/src/cloudflare/resources/zero_trust/dlp/payload_logs.py +++ b/src/cloudflare/resources/zero_trust/dlp/payload_logs.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.dlp import payload_log_update_params from ....types.zero_trust.dlp.payload_log_get_response import PayloadLogGetResponse from ....types.zero_trust.dlp.payload_log_update_response import PayloadLogUpdateResponse diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py b/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py index 7e19dd0cb92..955f5830213 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dlp.profiles import custom_create_params, custom_update_params from .....types.zero_trust.dlp.context_awareness_param import ContextAwarenessParam from .....types.zero_trust.dlp.profiles.custom_profile import CustomProfile diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py index 2b8664d00c4..ff0c160ac1f 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.dlp.profiles import predefined_update_params from .....types.zero_trust.dlp.context_awareness_param import ContextAwarenessParam from .....types.zero_trust.dlp.profiles.predefined_profile import PredefinedProfile diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py b/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py index 217be9367b3..5938b4c3b84 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py @@ -33,10 +33,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.dlp.profile import Profile from .....types.zero_trust.dlp.profile_get_response import ProfileGetResponse diff --git a/src/cloudflare/resources/zero_trust/gateway/app_types.py b/src/cloudflare/resources/zero_trust/gateway/app_types.py index 7a10d91cabd..bb06a6f6f3a 100644 --- a/src/cloudflare/resources/zero_trust/gateway/app_types.py +++ b/src/cloudflare/resources/zero_trust/gateway/app_types.py @@ -16,10 +16,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.gateway.app_type import AppType __all__ = ["AppTypesResource", "AsyncAppTypesResource"] diff --git a/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py b/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py index 6b3800f4df4..44a542f7521 100644 --- a/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py +++ b/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.gateway import audit_ssh_setting_update_params from ....types.zero_trust.gateway.gateway_settings import GatewaySettings diff --git a/src/cloudflare/resources/zero_trust/gateway/categories.py b/src/cloudflare/resources/zero_trust/gateway/categories.py index 567a0b88a36..9b8f47fdcb0 100644 --- a/src/cloudflare/resources/zero_trust/gateway/categories.py +++ b/src/cloudflare/resources/zero_trust/gateway/categories.py @@ -14,10 +14,7 @@ async_to_streamed_response_wrapper, ) from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.gateway.category import Category __all__ = ["CategoriesResource", "AsyncCategoriesResource"] diff --git a/src/cloudflare/resources/zero_trust/gateway/certificates.py b/src/cloudflare/resources/zero_trust/gateway/certificates.py index 8e9b8b954f2..311cf14b57c 100644 --- a/src/cloudflare/resources/zero_trust/gateway/certificates.py +++ b/src/cloudflare/resources/zero_trust/gateway/certificates.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +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 diff --git a/src/cloudflare/resources/zero_trust/gateway/configurations.py b/src/cloudflare/resources/zero_trust/gateway/configurations.py index 6f30fdb7210..e2cff7738c0 100644 --- a/src/cloudflare/resources/zero_trust/gateway/configurations.py +++ b/src/cloudflare/resources/zero_trust/gateway/configurations.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.gateway import ( configuration_edit_params, configuration_update_params, diff --git a/src/cloudflare/resources/zero_trust/gateway/gateway.py b/src/cloudflare/resources/zero_trust/gateway/gateway.py index 9d43923083a..b1fc5c79516 100644 --- a/src/cloudflare/resources/zero_trust/gateway/gateway.py +++ b/src/cloudflare/resources/zero_trust/gateway/gateway.py @@ -81,9 +81,7 @@ ConfigurationsResourceWithStreamingResponse, AsyncConfigurationsResourceWithStreamingResponse, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from .proxy_endpoints import ( ProxyEndpointsResource, AsyncProxyEndpointsResource, diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/items.py b/src/cloudflare/resources/zero_trust/gateway/lists/items.py index a8aa06368d5..8a43c7e6c76 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/items.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/items.py @@ -14,10 +14,7 @@ async_to_streamed_response_wrapper, ) from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.gateway.lists.item_list_response import ItemListResponse __all__ = ["ItemsResource", "AsyncItemsResource"] diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index 20f88988e72..7c484696504 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -30,10 +30,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import 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.gateway_list import GatewayList from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py index e77cf3be32d..806538130b4 100644 --- a/src/cloudflare/resources/zero_trust/gateway/locations.py +++ b/src/cloudflare/resources/zero_trust/gateway/locations.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.gateway import location_create_params, location_update_params from ....types.zero_trust.gateway.location import Location from ....types.zero_trust.gateway.location_network_param import LocationNetworkParam diff --git a/src/cloudflare/resources/zero_trust/gateway/logging.py b/src/cloudflare/resources/zero_trust/gateway/logging.py index 3a150ccf4e3..64eff13efdb 100644 --- a/src/cloudflare/resources/zero_trust/gateway/logging.py +++ b/src/cloudflare/resources/zero_trust/gateway/logging.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.gateway import logging_update_params from ....types.zero_trust.gateway.logging_setting import LoggingSetting diff --git a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py index 6ff679a7bc6..322eae10991 100644 --- a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py +++ b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.gateway import proxy_endpoint_edit_params, proxy_endpoint_create_params from ....types.zero_trust.gateway.gateway_ips import GatewayIPs from ....types.zero_trust.gateway.proxy_endpoint import ProxyEndpoint diff --git a/src/cloudflare/resources/zero_trust/gateway/rules.py b/src/cloudflare/resources/zero_trust/gateway/rules.py index 0346b993d38..16d7df08139 100644 --- a/src/cloudflare/resources/zero_trust/gateway/rules.py +++ b/src/cloudflare/resources/zero_trust/gateway/rules.py @@ -22,10 +22,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.gateway import rule_create_params, rule_update_params from ....types.zero_trust.gateway.gateway_rule import GatewayRule from ....types.zero_trust.gateway.gateway_filter import GatewayFilter diff --git a/src/cloudflare/resources/zero_trust/identity_providers.py b/src/cloudflare/resources/zero_trust/identity_providers.py index 5c6851b1306..48c9c7b9027 100644 --- a/src/cloudflare/resources/zero_trust/identity_providers.py +++ b/src/cloudflare/resources/zero_trust/identity_providers.py @@ -22,10 +22,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.zero_trust import ( IdentityProviderType, identity_provider_create_params, diff --git a/src/cloudflare/resources/zero_trust/networks/routes/ips.py b/src/cloudflare/resources/zero_trust/networks/routes/ips.py index a8864c8a8cb..c0dfa2f679c 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/ips.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/ips.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.networks.routes import ip_get_params from .....types.zero_trust.networks.teamnet import Teamnet diff --git a/src/cloudflare/resources/zero_trust/networks/routes/networks.py b/src/cloudflare/resources/zero_trust/networks/routes/networks.py index e125b34a288..c5defa8b985 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/networks.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/networks.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.networks.route import Route from .....types.zero_trust.networks.routes import network_create_params, network_delete_params diff --git a/src/cloudflare/resources/zero_trust/networks/routes/routes.py b/src/cloudflare/resources/zero_trust/networks/routes/routes.py index 9a6cd15ba68..102a782dfa7 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/routes.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/routes.py @@ -38,10 +38,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.networks import route_edit_params, route_list_params, route_create_params from .....types.zero_trust.networks.route import Route from .....types.zero_trust.networks.teamnet import Teamnet diff --git a/src/cloudflare/resources/zero_trust/networks/virtual_networks.py b/src/cloudflare/resources/zero_trust/networks/virtual_networks.py index 78c9995d771..03a4689a51f 100644 --- a/src/cloudflare/resources/zero_trust/networks/virtual_networks.py +++ b/src/cloudflare/resources/zero_trust/networks/virtual_networks.py @@ -21,10 +21,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.networks import ( virtual_network_edit_params, virtual_network_list_params, diff --git a/src/cloudflare/resources/zero_trust/organizations.py b/src/cloudflare/resources/zero_trust/organizations.py index 57abae8cc92..049a368926e 100644 --- a/src/cloudflare/resources/zero_trust/organizations.py +++ b/src/cloudflare/resources/zero_trust/organizations.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.zero_trust import ( organization_create_params, organization_update_params, diff --git a/src/cloudflare/resources/zero_trust/risk_scoring/behaviours.py b/src/cloudflare/resources/zero_trust/risk_scoring/behaviours.py index 4e294213fb7..8f4f42fc83c 100644 --- a/src/cloudflare/resources/zero_trust/risk_scoring/behaviours.py +++ b/src/cloudflare/resources/zero_trust/risk_scoring/behaviours.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.risk_scoring import behaviour_update_params from ....types.zero_trust.risk_scoring.behaviour_get_response import BehaviourGetResponse from ....types.zero_trust.risk_scoring.behaviour_update_response import BehaviourUpdateResponse diff --git a/src/cloudflare/resources/zero_trust/risk_scoring/integrations/integrations.py b/src/cloudflare/resources/zero_trust/risk_scoring/integrations/integrations.py index 093cacc5ea2..0e1c8f96254 100644 --- a/src/cloudflare/resources/zero_trust/risk_scoring/integrations/integrations.py +++ b/src/cloudflare/resources/zero_trust/risk_scoring/integrations/integrations.py @@ -30,10 +30,7 @@ ) from ....._wrappers import ResultWrapper from .....pagination import SyncSinglePage, AsyncSinglePage -from ....._base_client import ( - AsyncPaginator, - make_request_options, -) +from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.risk_scoring import integration_create_params, integration_update_params from .....types.zero_trust.risk_scoring.integration_get_response import IntegrationGetResponse from .....types.zero_trust.risk_scoring.integration_list_response import IntegrationListResponse diff --git a/src/cloudflare/resources/zero_trust/risk_scoring/integrations/references.py b/src/cloudflare/resources/zero_trust/risk_scoring/integrations/references.py index 604fb052a84..654afa2ccc5 100644 --- a/src/cloudflare/resources/zero_trust/risk_scoring/integrations/references.py +++ b/src/cloudflare/resources/zero_trust/risk_scoring/integrations/references.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper -from ....._base_client import ( - make_request_options, -) +from ....._base_client import make_request_options from .....types.zero_trust.risk_scoring.integrations.reference_get_response import ReferenceGetResponse __all__ = ["ReferencesResource", "AsyncReferencesResource"] diff --git a/src/cloudflare/resources/zero_trust/risk_scoring/risk_scoring.py b/src/cloudflare/resources/zero_trust/risk_scoring/risk_scoring.py index 653f23f6bf0..143c217ba65 100644 --- a/src/cloudflare/resources/zero_trust/risk_scoring/risk_scoring.py +++ b/src/cloudflare/resources/zero_trust/risk_scoring/risk_scoring.py @@ -45,9 +45,7 @@ IntegrationsResourceWithStreamingResponse, AsyncIntegrationsResourceWithStreamingResponse, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust import risk_scoring_get_params from .integrations.integrations import IntegrationsResource, AsyncIntegrationsResource from ....types.zero_trust.risk_scoring_get_response import RiskScoringGetResponse diff --git a/src/cloudflare/resources/zero_trust/risk_scoring/summary.py b/src/cloudflare/resources/zero_trust/risk_scoring/summary.py index cb117e9adf8..9546d14a2c6 100644 --- a/src/cloudflare/resources/zero_trust/risk_scoring/summary.py +++ b/src/cloudflare/resources/zero_trust/risk_scoring/summary.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.risk_scoring import summary_get_params from ....types.zero_trust.risk_scoring.summary_get_response import SummaryGetResponse diff --git a/src/cloudflare/resources/zero_trust/seats.py b/src/cloudflare/resources/zero_trust/seats.py index fa9fbe00220..583fab41a80 100644 --- a/src/cloudflare/resources/zero_trust/seats.py +++ b/src/cloudflare/resources/zero_trust/seats.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.zero_trust import seat_edit_params from ...types.zero_trust.seat_edit_response import SeatEditResponse diff --git a/src/cloudflare/resources/zero_trust/tunnels/configurations.py b/src/cloudflare/resources/zero_trust/tunnels/configurations.py index c120a5e7be4..13769b1de9f 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/configurations.py +++ b/src/cloudflare/resources/zero_trust/tunnels/configurations.py @@ -20,9 +20,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.tunnels import configuration_update_params from ....types.zero_trust.tunnels.configuration_get_response import ConfigurationGetResponse from ....types.zero_trust.tunnels.configuration_update_response import ConfigurationUpdateResponse diff --git a/src/cloudflare/resources/zero_trust/tunnels/connections.py b/src/cloudflare/resources/zero_trust/tunnels/connections.py index 2b1e4096eed..65bdd4c4477 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/connections.py +++ b/src/cloudflare/resources/zero_trust/tunnels/connections.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.tunnels.connection_get_response import ConnectionGetResponse from ....types.zero_trust.tunnels.connection_delete_response import ConnectionDeleteResponse diff --git a/src/cloudflare/resources/zero_trust/tunnels/connectors.py b/src/cloudflare/resources/zero_trust/tunnels/connectors.py index 808e77b4305..3e446f0d7e6 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/connectors.py +++ b/src/cloudflare/resources/zero_trust/tunnels/connectors.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.tunnels.client import Client __all__ = ["ConnectorsResource", "AsyncConnectorsResource"] diff --git a/src/cloudflare/resources/zero_trust/tunnels/management.py b/src/cloudflare/resources/zero_trust/tunnels/management.py index 4f25c400020..4da193130b6 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/management.py +++ b/src/cloudflare/resources/zero_trust/tunnels/management.py @@ -21,9 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.tunnels import management_create_params from ....types.zero_trust.tunnels.management_create_response import ManagementCreateResponse diff --git a/src/cloudflare/resources/zero_trust/tunnels/token.py b/src/cloudflare/resources/zero_trust/tunnels/token.py index 944e0d9b817..2f98dd7102e 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/token.py +++ b/src/cloudflare/resources/zero_trust/tunnels/token.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.zero_trust.tunnels.token_get_response import TokenGetResponse __all__ = ["TokenResource", "AsyncTokenResource"] diff --git a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py index 4133b87dcf2..cac703fedf1 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py +++ b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py @@ -63,10 +63,7 @@ ConfigurationsResourceWithStreamingResponse, AsyncConfigurationsResourceWithStreamingResponse, ) -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust import tunnel_edit_params, tunnel_list_params, tunnel_create_params from ....types.zero_trust.tunnel_get_response import TunnelGetResponse from ....types.zero_trust.tunnel_edit_response import TunnelEditResponse diff --git a/src/cloudflare/resources/zones/activation_check.py b/src/cloudflare/resources/zones/activation_check.py index 6a09257b5fe..7770e90f797 100644 --- a/src/cloudflare/resources/zones/activation_check.py +++ b/src/cloudflare/resources/zones/activation_check.py @@ -16,9 +16,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.zones.activation_check_trigger_response import ActivationCheckTriggerResponse __all__ = ["ActivationCheckResource", "AsyncActivationCheckResource"] diff --git a/src/cloudflare/resources/zones/custom_nameservers.py b/src/cloudflare/resources/zones/custom_nameservers.py index 641fd246f32..a0bb540a1f7 100644 --- a/src/cloudflare/resources/zones/custom_nameservers.py +++ b/src/cloudflare/resources/zones/custom_nameservers.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.zones import custom_nameserver_update_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.zones.custom_nameserver_get_response import CustomNameserverGetResponse from ...types.zones.custom_nameserver_update_response import CustomNameserverUpdateResponse diff --git a/src/cloudflare/resources/zones/holds.py b/src/cloudflare/resources/zones/holds.py index 120d910d5cf..3e96ed85ab8 100644 --- a/src/cloudflare/resources/zones/holds.py +++ b/src/cloudflare/resources/zones/holds.py @@ -21,9 +21,7 @@ ) from ..._wrappers import ResultWrapper from ...types.zones import hold_create_params, hold_delete_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.zones.zone_hold import ZoneHold __all__ = ["HoldsResource", "AsyncHoldsResource"] diff --git a/src/cloudflare/resources/zones/settings.py b/src/cloudflare/resources/zones/settings.py index 1d80cf04b08..d9196989881 100644 --- a/src/cloudflare/resources/zones/settings.py +++ b/src/cloudflare/resources/zones/settings.py @@ -23,9 +23,7 @@ ) from ..._wrappers import ResultWrapper from ...types.zones import setting_edit_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.zones.setting_get_response import SettingGetResponse from ...types.zones.setting_edit_response import SettingEditResponse from ...types.zones.automatic_platform_optimization_param import AutomaticPlatformOptimizationParam diff --git a/src/cloudflare/resources/zones/subscriptions.py b/src/cloudflare/resources/zones/subscriptions.py index bf49382c3a0..4db014c8cc8 100644 --- a/src/cloudflare/resources/zones/subscriptions.py +++ b/src/cloudflare/resources/zones/subscriptions.py @@ -23,10 +23,7 @@ from ..._wrappers import ResultWrapper from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.zones import subscription_create_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.user.subscription import Subscription from ...types.user.rate_plan_param import RatePlanParam from ...types.user.subscription_zone_param import SubscriptionZoneParam diff --git a/src/cloudflare/resources/zones/zones.py b/src/cloudflare/resources/zones/zones.py index 03e2d448793..e526d6012c1 100644 --- a/src/cloudflare/resources/zones/zones.py +++ b/src/cloudflare/resources/zones/zones.py @@ -47,10 +47,7 @@ SubscriptionsResourceWithStreamingResponse, AsyncSubscriptionsResourceWithStreamingResponse, ) -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .activation_check import ( ActivationCheckResource, AsyncActivationCheckResource, From 0ce4b26ad021bef18defee002e53c9a6772d44b1 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 13:09:24 +0000 Subject: [PATCH 229/316] 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 f92b447ada3..9700240bc5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml From 2eb03dd982a840ccfbc411f4074b592ed453455d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 13:15:27 +0000 Subject: [PATCH 230/316] 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 9700240bc5a..f92b447ada3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b481c2d12769429667fcd2cfadea18fc6dfc9c185c23928630cdb08fb6e69330.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml From 6a321d34b825d9217d847be1ea56cf611defe111 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:45:26 +0000 Subject: [PATCH 231/316] feat(api): OpenAPI spec update via Stainless API (#1176) --- .stats.yml | 4 +- api.md | 16 - src/cloudflare/resources/radar/__init__.py | 14 - .../resources/radar/connection_tampering.py | 432 ------------------ src/cloudflare/resources/radar/radar.py | 32 -- src/cloudflare/types/radar/__init__.py | 10 - .../connection_tampering_summary_params.py | 53 --- .../connection_tampering_summary_response.py | 89 ---- ...tion_tampering_timeseries_groups_params.py | 60 --- ...on_tampering_timeseries_groups_response.py | 95 ---- .../radar/test_connection_tampering.py | 216 --------- 11 files changed, 2 insertions(+), 1019 deletions(-) delete mode 100644 src/cloudflare/resources/radar/connection_tampering.py delete mode 100644 src/cloudflare/types/radar/connection_tampering_summary_params.py delete mode 100644 src/cloudflare/types/radar/connection_tampering_summary_response.py delete mode 100644 src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py delete mode 100644 src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py delete mode 100644 tests/api_resources/radar/test_connection_tampering.py diff --git a/.stats.yml b/.stats.yml index f92b447ada3..aa5b891ae18 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-095c75ce419923a8f7a92dc55b139890dfd0ad55f642c1abe42f63bc124a047c.yml +configured_endpoints: 1252 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08160758435c3d32f9f1d296fcd9664e5b67e7c453403bf02ac81f023ec470a3.yml diff --git a/api.md b/api.md index 5fd9ada828f..1945f0c0c95 100644 --- a/api.md +++ b/api.md @@ -6125,22 +6125,6 @@ Methods: - client.radar.as112.top.ip_version(ip_version, \*\*params) -> TopIPVersionResponse - client.radar.as112.top.locations(\*\*params) -> TopLocationsResponse -## ConnectionTampering - -Types: - -```python -from cloudflare.types.radar import ( - ConnectionTamperingSummaryResponse, - ConnectionTamperingTimeseriesGroupsResponse, -) -``` - -Methods: - -- client.radar.connection_tampering.summary(\*\*params) -> ConnectionTamperingSummaryResponse -- client.radar.connection_tampering.timeseries_groups(\*\*params) -> ConnectionTamperingTimeseriesGroupsResponse - ## Email Types: diff --git a/src/cloudflare/resources/radar/__init__.py b/src/cloudflare/resources/radar/__init__.py index 00dd0bb0fcf..20485edccb2 100644 --- a/src/cloudflare/resources/radar/__init__.py +++ b/src/cloudflare/resources/radar/__init__.py @@ -128,14 +128,6 @@ TrafficAnomaliesResourceWithStreamingResponse, AsyncTrafficAnomaliesResourceWithStreamingResponse, ) -from .connection_tampering import ( - ConnectionTamperingResource, - AsyncConnectionTamperingResource, - ConnectionTamperingResourceWithRawResponse, - AsyncConnectionTamperingResourceWithRawResponse, - ConnectionTamperingResourceWithStreamingResponse, - AsyncConnectionTamperingResourceWithStreamingResponse, -) __all__ = [ "AnnotationsResource", @@ -186,12 +178,6 @@ "AsyncAS112ResourceWithRawResponse", "AS112ResourceWithStreamingResponse", "AsyncAS112ResourceWithStreamingResponse", - "ConnectionTamperingResource", - "AsyncConnectionTamperingResource", - "ConnectionTamperingResourceWithRawResponse", - "AsyncConnectionTamperingResourceWithRawResponse", - "ConnectionTamperingResourceWithStreamingResponse", - "AsyncConnectionTamperingResourceWithStreamingResponse", "EmailResource", "AsyncEmailResource", "EmailResourceWithRawResponse", diff --git a/src/cloudflare/resources/radar/connection_tampering.py b/src/cloudflare/resources/radar/connection_tampering.py deleted file mode 100644 index 1371c2288ee..00000000000 --- a/src/cloudflare/resources/radar/connection_tampering.py +++ /dev/null @@ -1,432 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, Type, Union, cast -from datetime import datetime -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 ..._wrappers import ResultWrapper -from ...types.radar import connection_tampering_summary_params, connection_tampering_timeseries_groups_params -from ..._base_client import make_request_options -from ...types.radar.connection_tampering_summary_response import ConnectionTamperingSummaryResponse -from ...types.radar.connection_tampering_timeseries_groups_response import ConnectionTamperingTimeseriesGroupsResponse - -__all__ = ["ConnectionTamperingResource", "AsyncConnectionTamperingResource"] - - -class ConnectionTamperingResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ConnectionTamperingResourceWithRawResponse: - return ConnectionTamperingResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ConnectionTamperingResourceWithStreamingResponse: - return ConnectionTamperingResourceWithStreamingResponse(self) - - def summary( - self, - *, - asn: List[str] | NotGiven = NOT_GIVEN, - continent: List[str] | NotGiven = NOT_GIVEN, - date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[str] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - location: List[str] | NotGiven = NOT_GIVEN, - name: List[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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectionTamperingSummaryResponse: - """ - Distribution of connection tampering types over a given time period. - - Args: - asn: Array of comma separated list of ASNs, start with `-` to exclude from results. - For example, `-174, 3356` excludes results from AS174, but includes results from - AS3356. - - continent: Array of comma separated list of continents (alpha-2 continent codes). Start - with `-` to exclude from results. For example, `-EU,NA` excludes results from - Europe, but includes results from North America. - - date_end: End of the date range (inclusive). - - date_range: For example, use `7d` and `7dControl` to compare this week with the previous - week. Use this parameter or set specific start and end dates (`dateStart` and - `dateEnd` parameters). - - date_start: Array of datetimes to filter the start of a series. - - format: Format results are returned in. - - location: Array of comma separated list of locations (alpha-2 country codes). Start with - `-` to exclude from results. For example, `-US,PT` excludes results from the US, - but includes results from PT. - - name: Array of names that will be used to name the series in responses. - - 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 - """ - return self._get( - "/radar/connection_tampering/summary", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "asn": asn, - "continent": continent, - "date_end": date_end, - "date_range": date_range, - "date_start": date_start, - "format": format, - "location": location, - "name": name, - }, - connection_tampering_summary_params.ConnectionTamperingSummaryParams, - ), - post_parser=ResultWrapper[ConnectionTamperingSummaryResponse]._unwrapper, - ), - cast_to=cast(Type[ConnectionTamperingSummaryResponse], ResultWrapper[ConnectionTamperingSummaryResponse]), - ) - - def timeseries_groups( - self, - *, - agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, - asn: List[str] | NotGiven = NOT_GIVEN, - continent: List[str] | NotGiven = NOT_GIVEN, - date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[str] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - location: List[str] | NotGiven = NOT_GIVEN, - name: List[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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectionTamperingTimeseriesGroupsResponse: - """ - Distribution of connection tampering types over time. - - Args: - agg_interval: Aggregation interval results should be returned in (for example, in 15 minutes - or 1 hour intervals). Refer to - [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - - asn: Array of comma separated list of ASNs, start with `-` to exclude from results. - For example, `-174, 3356` excludes results from AS174, but includes results from - AS3356. - - continent: Array of comma separated list of continents (alpha-2 continent codes). Start - with `-` to exclude from results. For example, `-EU,NA` excludes results from - Europe, but includes results from North America. - - date_end: End of the date range (inclusive). - - date_range: For example, use `7d` and `7dControl` to compare this week with the previous - week. Use this parameter or set specific start and end dates (`dateStart` and - `dateEnd` parameters). - - date_start: Array of datetimes to filter the start of a series. - - format: Format results are returned in. - - location: Array of comma separated list of locations (alpha-2 country codes). Start with - `-` to exclude from results. For example, `-US,PT` excludes results from the US, - but includes results from PT. - - name: Array of names that will be used to name the series in responses. - - 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 - """ - return self._get( - "/radar/connection_tampering/timeseries_groups", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "agg_interval": agg_interval, - "asn": asn, - "continent": continent, - "date_end": date_end, - "date_range": date_range, - "date_start": date_start, - "format": format, - "location": location, - "name": name, - }, - connection_tampering_timeseries_groups_params.ConnectionTamperingTimeseriesGroupsParams, - ), - post_parser=ResultWrapper[ConnectionTamperingTimeseriesGroupsResponse]._unwrapper, - ), - cast_to=cast( - Type[ConnectionTamperingTimeseriesGroupsResponse], - ResultWrapper[ConnectionTamperingTimeseriesGroupsResponse], - ), - ) - - -class AsyncConnectionTamperingResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncConnectionTamperingResourceWithRawResponse: - return AsyncConnectionTamperingResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncConnectionTamperingResourceWithStreamingResponse: - return AsyncConnectionTamperingResourceWithStreamingResponse(self) - - async def summary( - self, - *, - asn: List[str] | NotGiven = NOT_GIVEN, - continent: List[str] | NotGiven = NOT_GIVEN, - date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[str] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - location: List[str] | NotGiven = NOT_GIVEN, - name: List[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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectionTamperingSummaryResponse: - """ - Distribution of connection tampering types over a given time period. - - Args: - asn: Array of comma separated list of ASNs, start with `-` to exclude from results. - For example, `-174, 3356` excludes results from AS174, but includes results from - AS3356. - - continent: Array of comma separated list of continents (alpha-2 continent codes). Start - with `-` to exclude from results. For example, `-EU,NA` excludes results from - Europe, but includes results from North America. - - date_end: End of the date range (inclusive). - - date_range: For example, use `7d` and `7dControl` to compare this week with the previous - week. Use this parameter or set specific start and end dates (`dateStart` and - `dateEnd` parameters). - - date_start: Array of datetimes to filter the start of a series. - - format: Format results are returned in. - - location: Array of comma separated list of locations (alpha-2 country codes). Start with - `-` to exclude from results. For example, `-US,PT` excludes results from the US, - but includes results from PT. - - name: Array of names that will be used to name the series in responses. - - 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 - """ - return await self._get( - "/radar/connection_tampering/summary", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "asn": asn, - "continent": continent, - "date_end": date_end, - "date_range": date_range, - "date_start": date_start, - "format": format, - "location": location, - "name": name, - }, - connection_tampering_summary_params.ConnectionTamperingSummaryParams, - ), - post_parser=ResultWrapper[ConnectionTamperingSummaryResponse]._unwrapper, - ), - cast_to=cast(Type[ConnectionTamperingSummaryResponse], ResultWrapper[ConnectionTamperingSummaryResponse]), - ) - - async def timeseries_groups( - self, - *, - agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, - asn: List[str] | NotGiven = NOT_GIVEN, - continent: List[str] | NotGiven = NOT_GIVEN, - date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - date_range: List[str] | NotGiven = NOT_GIVEN, - date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, - format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - location: List[str] | NotGiven = NOT_GIVEN, - name: List[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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectionTamperingTimeseriesGroupsResponse: - """ - Distribution of connection tampering types over time. - - Args: - agg_interval: Aggregation interval results should be returned in (for example, in 15 minutes - or 1 hour intervals). Refer to - [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - - asn: Array of comma separated list of ASNs, start with `-` to exclude from results. - For example, `-174, 3356` excludes results from AS174, but includes results from - AS3356. - - continent: Array of comma separated list of continents (alpha-2 continent codes). Start - with `-` to exclude from results. For example, `-EU,NA` excludes results from - Europe, but includes results from North America. - - date_end: End of the date range (inclusive). - - date_range: For example, use `7d` and `7dControl` to compare this week with the previous - week. Use this parameter or set specific start and end dates (`dateStart` and - `dateEnd` parameters). - - date_start: Array of datetimes to filter the start of a series. - - format: Format results are returned in. - - location: Array of comma separated list of locations (alpha-2 country codes). Start with - `-` to exclude from results. For example, `-US,PT` excludes results from the US, - but includes results from PT. - - name: Array of names that will be used to name the series in responses. - - 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 - """ - return await self._get( - "/radar/connection_tampering/timeseries_groups", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "agg_interval": agg_interval, - "asn": asn, - "continent": continent, - "date_end": date_end, - "date_range": date_range, - "date_start": date_start, - "format": format, - "location": location, - "name": name, - }, - connection_tampering_timeseries_groups_params.ConnectionTamperingTimeseriesGroupsParams, - ), - post_parser=ResultWrapper[ConnectionTamperingTimeseriesGroupsResponse]._unwrapper, - ), - cast_to=cast( - Type[ConnectionTamperingTimeseriesGroupsResponse], - ResultWrapper[ConnectionTamperingTimeseriesGroupsResponse], - ), - ) - - -class ConnectionTamperingResourceWithRawResponse: - def __init__(self, connection_tampering: ConnectionTamperingResource) -> None: - self._connection_tampering = connection_tampering - - self.summary = to_raw_response_wrapper( - connection_tampering.summary, - ) - self.timeseries_groups = to_raw_response_wrapper( - connection_tampering.timeseries_groups, - ) - - -class AsyncConnectionTamperingResourceWithRawResponse: - def __init__(self, connection_tampering: AsyncConnectionTamperingResource) -> None: - self._connection_tampering = connection_tampering - - self.summary = async_to_raw_response_wrapper( - connection_tampering.summary, - ) - self.timeseries_groups = async_to_raw_response_wrapper( - connection_tampering.timeseries_groups, - ) - - -class ConnectionTamperingResourceWithStreamingResponse: - def __init__(self, connection_tampering: ConnectionTamperingResource) -> None: - self._connection_tampering = connection_tampering - - self.summary = to_streamed_response_wrapper( - connection_tampering.summary, - ) - self.timeseries_groups = to_streamed_response_wrapper( - connection_tampering.timeseries_groups, - ) - - -class AsyncConnectionTamperingResourceWithStreamingResponse: - def __init__(self, connection_tampering: AsyncConnectionTamperingResource) -> None: - self._connection_tampering = connection_tampering - - self.summary = async_to_streamed_response_wrapper( - connection_tampering.summary, - ) - self.timeseries_groups = async_to_streamed_response_wrapper( - connection_tampering.timeseries_groups, - ) diff --git a/src/cloudflare/resources/radar/radar.py b/src/cloudflare/resources/radar/radar.py index c6859e8b70c..29a0fd5a913 100644 --- a/src/cloudflare/resources/radar/radar.py +++ b/src/cloudflare/resources/radar/radar.py @@ -134,14 +134,6 @@ TrafficAnomaliesResourceWithStreamingResponse, AsyncTrafficAnomaliesResourceWithStreamingResponse, ) -from .connection_tampering import ( - ConnectionTamperingResource, - AsyncConnectionTamperingResource, - ConnectionTamperingResourceWithRawResponse, - AsyncConnectionTamperingResourceWithRawResponse, - ConnectionTamperingResourceWithStreamingResponse, - AsyncConnectionTamperingResourceWithStreamingResponse, -) from .annotations.annotations import AnnotationsResource, AsyncAnnotationsResource from .verified_bots.verified_bots import VerifiedBotsResource, AsyncVerifiedBotsResource from .traffic_anomalies.traffic_anomalies import TrafficAnomaliesResource, AsyncTrafficAnomaliesResource @@ -182,10 +174,6 @@ def verified_bots(self) -> VerifiedBotsResource: def as112(self) -> AS112Resource: return AS112Resource(self._client) - @cached_property - def connection_tampering(self) -> ConnectionTamperingResource: - return ConnectionTamperingResource(self._client) - @cached_property def email(self) -> EmailResource: return EmailResource(self._client) @@ -256,10 +244,6 @@ def verified_bots(self) -> AsyncVerifiedBotsResource: def as112(self) -> AsyncAS112Resource: return AsyncAS112Resource(self._client) - @cached_property - def connection_tampering(self) -> AsyncConnectionTamperingResource: - return AsyncConnectionTamperingResource(self._client) - @cached_property def email(self) -> AsyncEmailResource: return AsyncEmailResource(self._client) @@ -333,10 +317,6 @@ def verified_bots(self) -> VerifiedBotsResourceWithRawResponse: def as112(self) -> AS112ResourceWithRawResponse: return AS112ResourceWithRawResponse(self._radar.as112) - @cached_property - def connection_tampering(self) -> ConnectionTamperingResourceWithRawResponse: - return ConnectionTamperingResourceWithRawResponse(self._radar.connection_tampering) - @cached_property def email(self) -> EmailResourceWithRawResponse: return EmailResourceWithRawResponse(self._radar.email) @@ -402,10 +382,6 @@ def verified_bots(self) -> AsyncVerifiedBotsResourceWithRawResponse: def as112(self) -> AsyncAS112ResourceWithRawResponse: return AsyncAS112ResourceWithRawResponse(self._radar.as112) - @cached_property - def connection_tampering(self) -> AsyncConnectionTamperingResourceWithRawResponse: - return AsyncConnectionTamperingResourceWithRawResponse(self._radar.connection_tampering) - @cached_property def email(self) -> AsyncEmailResourceWithRawResponse: return AsyncEmailResourceWithRawResponse(self._radar.email) @@ -471,10 +447,6 @@ def verified_bots(self) -> VerifiedBotsResourceWithStreamingResponse: def as112(self) -> AS112ResourceWithStreamingResponse: return AS112ResourceWithStreamingResponse(self._radar.as112) - @cached_property - def connection_tampering(self) -> ConnectionTamperingResourceWithStreamingResponse: - return ConnectionTamperingResourceWithStreamingResponse(self._radar.connection_tampering) - @cached_property def email(self) -> EmailResourceWithStreamingResponse: return EmailResourceWithStreamingResponse(self._radar.email) @@ -540,10 +512,6 @@ def verified_bots(self) -> AsyncVerifiedBotsResourceWithStreamingResponse: def as112(self) -> AsyncAS112ResourceWithStreamingResponse: return AsyncAS112ResourceWithStreamingResponse(self._radar.as112) - @cached_property - def connection_tampering(self) -> AsyncConnectionTamperingResourceWithStreamingResponse: - return AsyncConnectionTamperingResourceWithStreamingResponse(self._radar.connection_tampering) - @cached_property def email(self) -> AsyncEmailResourceWithStreamingResponse: return AsyncEmailResourceWithStreamingResponse(self._radar.email) diff --git a/src/cloudflare/types/radar/__init__.py b/src/cloudflare/types/radar/__init__.py index 63e479b1721..c41928c0014 100644 --- a/src/cloudflare/types/radar/__init__.py +++ b/src/cloudflare/types/radar/__init__.py @@ -27,13 +27,3 @@ from .traffic_anomaly_get_response import TrafficAnomalyGetResponse as TrafficAnomalyGetResponse from .ranking_timeseries_groups_params import RankingTimeseriesGroupsParams as RankingTimeseriesGroupsParams from .ranking_timeseries_groups_response import RankingTimeseriesGroupsResponse as RankingTimeseriesGroupsResponse -from .connection_tampering_summary_params import ConnectionTamperingSummaryParams as ConnectionTamperingSummaryParams -from .connection_tampering_summary_response import ( - ConnectionTamperingSummaryResponse as ConnectionTamperingSummaryResponse, -) -from .connection_tampering_timeseries_groups_params import ( - ConnectionTamperingTimeseriesGroupsParams as ConnectionTamperingTimeseriesGroupsParams, -) -from .connection_tampering_timeseries_groups_response import ( - ConnectionTamperingTimeseriesGroupsResponse as ConnectionTamperingTimeseriesGroupsResponse, -) diff --git a/src/cloudflare/types/radar/connection_tampering_summary_params.py b/src/cloudflare/types/radar/connection_tampering_summary_params.py deleted file mode 100644 index 8d20f6b54dd..00000000000 --- a/src/cloudflare/types/radar/connection_tampering_summary_params.py +++ /dev/null @@ -1,53 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, Union -from datetime import datetime -from typing_extensions import Literal, Annotated, TypedDict - -from ..._utils import PropertyInfo - -__all__ = ["ConnectionTamperingSummaryParams"] - - -class ConnectionTamperingSummaryParams(TypedDict, total=False): - asn: List[str] - """Array of comma separated list of ASNs, start with `-` to exclude from results. - - For example, `-174, 3356` excludes results from AS174, but includes results from - AS3356. - """ - - continent: List[str] - """Array of comma separated list of continents (alpha-2 continent codes). - - Start with `-` to exclude from results. For example, `-EU,NA` excludes results - from Europe, but includes results from North America. - """ - - date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] - """End of the date range (inclusive).""" - - date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] - """ - For example, use `7d` and `7dControl` to compare this week with the previous - week. Use this parameter or set specific start and end dates (`dateStart` and - `dateEnd` parameters). - """ - - date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] - """Array of datetimes to filter the start of a series.""" - - format: Literal["JSON", "CSV"] - """Format results are returned in.""" - - location: List[str] - """Array of comma separated list of locations (alpha-2 country codes). - - Start with `-` to exclude from results. For example, `-US,PT` excludes results - from the US, but includes results from PT. - """ - - name: List[str] - """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/connection_tampering_summary_response.py b/src/cloudflare/types/radar/connection_tampering_summary_response.py deleted file mode 100644 index 4f093b99de1..00000000000 --- a/src/cloudflare/types/radar/connection_tampering_summary_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import datetime - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "ConnectionTamperingSummaryResponse", - "Meta", - "MetaDateRange", - "MetaConfidenceInfo", - "MetaConfidenceInfoAnnotation", - "Summary0", -] - - -class MetaDateRange(BaseModel): - end_time: datetime = FieldInfo(alias="endTime") - """Adjusted end of date range.""" - - start_time: datetime = FieldInfo(alias="startTime") - """Adjusted start of date range.""" - - -class MetaConfidenceInfoAnnotation(BaseModel): - data_source: str = FieldInfo(alias="dataSource") - - description: str - - event_type: str = FieldInfo(alias="eventType") - - is_instantaneous: bool = FieldInfo(alias="isInstantaneous") - - end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) - - linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None) - - start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) - - -class MetaConfidenceInfo(BaseModel): - annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None - - level: Optional[int] = None - - -class Meta(BaseModel): - date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") - - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) - - -class Summary0(BaseModel): - later_in_flow: str - """ - Connections matching signatures for tampering later in the connection, after the - transfer of multiple data packets. - """ - - no_match: str - """Connections that do not match any tampering signatures.""" - - post_ack: str - """ - Connections matching signatures for tampering after the receipt of a SYN packet - and ACK packet, meaning the TCP connection was successfully established but the - server did not receive any subsequent packets. - """ - - post_psh: str - """ - Connections matching signatures for tampering after the receipt of a packet with - PSH flag set, following connection establishment. - """ - - post_syn: str - """ - Connections matching signatures for tampering after the receipt of only a single - SYN packet, and before the handshake completes. - """ - - -class ConnectionTamperingSummaryResponse(BaseModel): - meta: Meta - - summary_0: Summary0 diff --git a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py b/src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py deleted file mode 100644 index 176588e5de7..00000000000 --- a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_params.py +++ /dev/null @@ -1,60 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, Union -from datetime import datetime -from typing_extensions import Literal, Annotated, TypedDict - -from ..._utils import PropertyInfo - -__all__ = ["ConnectionTamperingTimeseriesGroupsParams"] - - -class ConnectionTamperingTimeseriesGroupsParams(TypedDict, total=False): - agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] - """ - Aggregation interval results should be returned in (for example, in 15 minutes - or 1 hour intervals). Refer to - [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - """ - - asn: List[str] - """Array of comma separated list of ASNs, start with `-` to exclude from results. - - For example, `-174, 3356` excludes results from AS174, but includes results from - AS3356. - """ - - continent: List[str] - """Array of comma separated list of continents (alpha-2 continent codes). - - Start with `-` to exclude from results. For example, `-EU,NA` excludes results - from Europe, but includes results from North America. - """ - - date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] - """End of the date range (inclusive).""" - - date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] - """ - For example, use `7d` and `7dControl` to compare this week with the previous - week. Use this parameter or set specific start and end dates (`dateStart` and - `dateEnd` parameters). - """ - - date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] - """Array of datetimes to filter the start of a series.""" - - format: Literal["JSON", "CSV"] - """Format results are returned in.""" - - location: List[str] - """Array of comma separated list of locations (alpha-2 country codes). - - Start with `-` to exclude from results. For example, `-US,PT` excludes results - from the US, but includes results from PT. - """ - - name: List[str] - """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py b/src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py deleted file mode 100644 index f6aeb05577b..00000000000 --- a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import datetime - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "ConnectionTamperingTimeseriesGroupsResponse", - "Meta", - "MetaDateRange", - "MetaConfidenceInfo", - "MetaConfidenceInfoAnnotation", - "Serie0", -] - - -class MetaDateRange(BaseModel): - end_time: datetime = FieldInfo(alias="endTime") - """Adjusted end of date range.""" - - start_time: datetime = FieldInfo(alias="startTime") - """Adjusted start of date range.""" - - -class MetaConfidenceInfoAnnotation(BaseModel): - data_source: str = FieldInfo(alias="dataSource") - - description: str - - event_type: str = FieldInfo(alias="eventType") - - is_instantaneous: bool = FieldInfo(alias="isInstantaneous") - - end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) - - linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None) - - start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) - - -class MetaConfidenceInfo(BaseModel): - annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None - - level: Optional[int] = None - - -class Meta(BaseModel): - agg_interval: str = FieldInfo(alias="aggInterval") - - date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") - - last_updated: datetime = FieldInfo(alias="lastUpdated") - - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) - - -class Serie0(BaseModel): - later_in_flow: List[str] - """ - Connections matching signatures for tampering later in the connection, after the - transfer of multiple data packets. - """ - - no_match: List[str] - """Connections that do not match any tampering signatures.""" - - post_ack: List[str] - """ - Connections matching signatures for tampering after the receipt of a SYN packet - and ACK packet, meaning the TCP connection was successfully established but the - server did not receive any subsequent packets. - """ - - post_psh: List[str] - """ - Connections matching signatures for tampering after the receipt of a packet with - PSH flag set, following connection establishment. - """ - - post_syn: List[str] - """ - Connections matching signatures for tampering after the receipt of only a single - SYN packet, and before the handshake completes. - """ - - timestamps: List[datetime] - - -class ConnectionTamperingTimeseriesGroupsResponse(BaseModel): - meta: Meta - - serie_0: Serie0 diff --git a/tests/api_resources/radar/test_connection_tampering.py b/tests/api_resources/radar/test_connection_tampering.py deleted file mode 100644 index 159469316ed..00000000000 --- a/tests/api_resources/radar/test_connection_tampering.py +++ /dev/null @@ -1,216 +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._utils import parse_datetime -from cloudflare.types.radar import ( - ConnectionTamperingSummaryResponse, - ConnectionTamperingTimeseriesGroupsResponse, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestConnectionTampering: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_summary(self, client: Cloudflare) -> None: - connection_tampering = client.radar.connection_tampering.summary() - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - @parametrize - def test_method_summary_with_all_params(self, client: Cloudflare) -> None: - connection_tampering = client.radar.connection_tampering.summary( - asn=["string", "string", "string"], - continent=["string", "string", "string"], - date_end=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - date_range=["7d", "7d", "7d"], - date_start=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - format="JSON", - location=["string", "string", "string"], - name=["string", "string", "string"], - ) - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - @parametrize - def test_raw_response_summary(self, client: Cloudflare) -> None: - response = client.radar.connection_tampering.with_raw_response.summary() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - connection_tampering = response.parse() - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - @parametrize - def test_streaming_response_summary(self, client: Cloudflare) -> None: - with client.radar.connection_tampering.with_streaming_response.summary() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - connection_tampering = response.parse() - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_timeseries_groups(self, client: Cloudflare) -> None: - connection_tampering = client.radar.connection_tampering.timeseries_groups() - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - @parametrize - def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: - connection_tampering = client.radar.connection_tampering.timeseries_groups( - agg_interval="1h", - asn=["string", "string", "string"], - continent=["string", "string", "string"], - date_end=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - date_range=["7d", "7d", "7d"], - date_start=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - format="JSON", - location=["string", "string", "string"], - name=["string", "string", "string"], - ) - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - @parametrize - def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: - response = client.radar.connection_tampering.with_raw_response.timeseries_groups() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - connection_tampering = response.parse() - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - @parametrize - def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: - with client.radar.connection_tampering.with_streaming_response.timeseries_groups() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - connection_tampering = response.parse() - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncConnectionTampering: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_summary(self, async_client: AsyncCloudflare) -> None: - connection_tampering = await async_client.radar.connection_tampering.summary() - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - @parametrize - async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: - connection_tampering = await async_client.radar.connection_tampering.summary( - asn=["string", "string", "string"], - continent=["string", "string", "string"], - date_end=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - date_range=["7d", "7d", "7d"], - date_start=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - format="JSON", - location=["string", "string", "string"], - name=["string", "string", "string"], - ) - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - @parametrize - async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: - response = await async_client.radar.connection_tampering.with_raw_response.summary() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - connection_tampering = await response.parse() - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - @parametrize - async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: - async with async_client.radar.connection_tampering.with_streaming_response.summary() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - connection_tampering = await response.parse() - assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: - connection_tampering = await async_client.radar.connection_tampering.timeseries_groups() - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - @parametrize - async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: - connection_tampering = await async_client.radar.connection_tampering.timeseries_groups( - agg_interval="1h", - asn=["string", "string", "string"], - continent=["string", "string", "string"], - date_end=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - date_range=["7d", "7d", "7d"], - date_start=[ - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - parse_datetime("2019-12-27T18:11:19.117Z"), - ], - format="JSON", - location=["string", "string", "string"], - name=["string", "string", "string"], - ) - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - @parametrize - async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: - response = await async_client.radar.connection_tampering.with_raw_response.timeseries_groups() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - connection_tampering = await response.parse() - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - @parametrize - async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: - async with async_client.radar.connection_tampering.with_streaming_response.timeseries_groups() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - connection_tampering = await response.parse() - assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - - assert cast(Any, response.is_closed) is True From 736ef7dfbdbaf7c42ced3c702574142b02d006cd Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Fri, 12 Jul 2024 04:58:12 +0000 Subject: [PATCH 232/316] feat(api): OpenAPI spec update via Stainless API (#1177) --- .stats.yml | 2 +- tests/api_resources/accounts/test_members.py | 84 +- tests/api_resources/accounts/test_roles.py | 16 +- .../addressing/address_maps/test_accounts.py | 40 +- .../addressing/address_maps/test_ips.py | 48 +- .../addressing/address_maps/test_zones.py | 48 +- .../loa_documents/test_downloads.py | 20 +- .../addressing/prefixes/bgp/test_bindings.py | 92 +- .../addressing/prefixes/bgp/test_prefixes.py | 72 +- .../addressing/prefixes/bgp/test_statuses.py | 40 +- .../addressing/prefixes/test_delegations.py | 64 +- .../addressing/test_address_maps.py | 64 +- .../api_resources/addressing/test_prefixes.py | 60 +- .../addressing/test_regional_hostnames.py | 60 +- tests/api_resources/ai_gateway/test_logs.py | 28 +- .../alerting/destinations/test_pagerduty.py | 20 +- .../alerting/destinations/test_webhooks.py | 72 +- tests/api_resources/alerting/test_policies.py | 64 +- .../api_gateway/discovery/test_operations.py | 24 +- .../operations/test_schema_validation.py | 44 +- .../api_gateway/test_operations.py | 44 +- .../api_gateway/test_user_schemas.py | 68 +- .../user_schemas/test_operations.py | 24 +- tests/api_resources/calls/turn/test_keys.py | 64 +- .../api_resources/challenges/test_widgets.py | 88 +- .../cloudforce_one/requests/test_message.py | 92 +- .../cloudforce_one/requests/test_priority.py | 76 +- .../cloudforce_one/test_requests.py | 104 +- tests/api_resources/d1/test_database.py | 92 +- .../analytics/reports/test_bytimes.py | 24 +- .../dns/firewall/analytics/test_reports.py | 24 +- tests/api_resources/dns/test_firewall.py | 64 +- tests/api_resources/dns/test_records.py | 1140 ++++----- tests/api_resources/dns/test_settings.py | 40 +- .../namespaces/test_objects.py | 24 +- .../email_routing/rules/test_catch_alls.py | 20 +- .../email_routing/test_addresses.py | 76 +- .../api_resources/email_routing/test_rules.py | 104 +- .../r2/configuration/test_queues.py | 52 +- .../r2/test_configuration.py | 20 +- .../firewall/test_access_rules.py | 172 +- .../api_resources/firewall/test_lockdowns.py | 96 +- tests/api_resources/firewall/test_rules.py | 120 +- tests/api_resources/firewall/test_ua_rules.py | 96 +- .../firewall/waf/packages/test_groups.py | 76 +- .../firewall/waf/packages/test_rules.py | 80 +- .../firewall/waf/test_overrides.py | 96 +- .../firewall/waf/test_packages.py | 40 +- .../healthchecks/test_previews.py | 40 +- .../hostnames/settings/test_tls.py | 56 +- .../api_resources/hyperdrive/test_configs.py | 88 +- .../iam/test_permission_groups.py | 20 +- .../api_resources/iam/test_resource_groups.py | 64 +- tests/api_resources/images/test_v1.py | 64 +- tests/api_resources/images/test_v2.py | 4 +- tests/api_resources/images/v1/test_blobs.py | 32 +- tests/api_resources/images/v1/test_keys.py | 40 +- .../api_resources/images/v1/test_variants.py | 64 +- tests/api_resources/intel/asn/test_subnets.py | 16 +- .../attack_surface_report/test_issues.py | 24 +- .../intel/indicator_feeds/test_snapshots.py | 20 +- tests/api_resources/intel/test_asn.py | 16 +- tests/api_resources/intel/test_dns.py | 4 +- tests/api_resources/intel/test_domains.py | 4 +- .../intel/test_indicator_feeds.py | 52 +- tests/api_resources/intel/test_ips.py | 8 +- .../intel/test_miscategorizations.py | 4 +- tests/api_resources/intel/test_whois.py | 4 +- .../api_resources/kv/namespaces/test_bulk.py | 40 +- .../api_resources/kv/namespaces/test_keys.py | 24 +- .../kv/namespaces/test_metadata.py | 24 +- .../kv/namespaces/test_values.py | 72 +- tests/api_resources/kv/test_namespaces.py | 60 +- .../load_balancers/monitors/test_previews.py | 24 +- .../monitors/test_references.py | 20 +- .../load_balancers/pools/test_health.py | 44 +- .../load_balancers/pools/test_references.py | 20 +- .../load_balancers/test_monitors.py | 88 +- .../load_balancers/test_pools.py | 88 +- .../load_balancers/test_previews.py | 20 +- .../load_balancers/test_regions.py | 16 +- .../logpush/datasets/test_fields.py | 52 +- .../logpush/datasets/test_jobs.py | 52 +- tests/api_resources/logpush/test_jobs.py | 228 +- tests/api_resources/logpush/test_ownership.py | 40 +- tests/api_resources/logpush/test_validate.py | 40 +- .../logs/control/test_retention.py | 16 +- tests/api_resources/logs/test_rayid.py | 24 +- tests/api_resources/logs/test_received.py | 20 +- .../rules/test_advertisements.py | 20 +- .../magic_network_monitoring/test_rules.py | 60 +- .../magic_transit/sites/test_acls.py | 236 +- .../magic_transit/sites/test_lans.py | 160 +- .../magic_transit/sites/test_wans.py | 160 +- .../api_resources/magic_transit/test_apps.py | 100 +- .../magic_transit/test_cf_interconnects.py | 44 +- .../magic_transit/test_connectors.py | 84 +- .../magic_transit/test_gre_tunnels.py | 64 +- .../magic_transit/test_ipsec_tunnels.py | 84 +- .../magic_transit/test_routes.py | 64 +- .../api_resources/magic_transit/test_sites.py | 100 +- .../mtls_certificates/test_associations.py | 20 +- .../hostnames/test_certificates.py | 40 +- .../origin_tls_client_auth/test_hostnames.py | 20 +- .../page_shield/test_connections.py | 20 +- .../api_resources/page_shield/test_cookies.py | 20 +- .../page_shield/test_policies.py | 64 +- .../api_resources/page_shield/test_scripts.py | 20 +- .../projects/deployments/history/test_logs.py | 24 +- .../pages/projects/test_deployments.py | 144 +- .../pages/projects/test_domains.py | 112 +- tests/api_resources/pages/test_projects.py | 80 +- tests/api_resources/pcaps/test_download.py | 20 +- tests/api_resources/pcaps/test_ownership.py | 20 +- tests/api_resources/queues/test_consumers.py | 88 +- tests/api_resources/queues/test_messages.py | 48 +- tests/api_resources/r2/test_buckets.py | 44 +- tests/api_resources/r2/test_sippy.py | 132 +- tests/api_resources/radar/as112/test_top.py | 48 +- .../radar/bgp/hijacks/test_events.py | 4 +- .../radar/bgp/leaks/test_events.py | 4 +- .../email/security/top/tlds/test_malicious.py | 16 +- .../email/security/top/tlds/test_spam.py | 16 +- .../email/security/top/tlds/test_spoof.py | 16 +- .../api_resources/radar/entities/test_asns.py | 32 +- .../radar/entities/test_locations.py | 20 +- .../radar/http/ases/test_bot_class.py | 16 +- .../radar/http/ases/test_browser_family.py | 16 +- .../radar/http/ases/test_device_type.py | 16 +- .../radar/http/ases/test_http_method.py | 16 +- .../radar/http/ases/test_http_protocol.py | 16 +- .../radar/http/ases/test_ip_version.py | 16 +- .../api_resources/radar/http/ases/test_os.py | 16 +- .../radar/http/ases/test_tls_version.py | 16 +- .../radar/http/locations/test_bot_class.py | 16 +- .../http/locations/test_browser_family.py | 16 +- .../radar/http/locations/test_device_type.py | 16 +- .../radar/http/locations/test_http_method.py | 16 +- .../http/locations/test_http_protocol.py | 16 +- .../radar/http/locations/test_ip_version.py | 16 +- .../radar/http/locations/test_os.py | 16 +- .../radar/http/locations/test_tls_version.py | 16 +- .../radar/ranking/test_domain.py | 20 +- tests/api_resources/registrar/test_domains.py | 44 +- .../request_tracers/test_traces.py | 28 +- .../rules/lists/test_bulk_operations.py | 20 +- tests/api_resources/rules/lists/test_items.py | 108 +- tests/api_resources/rules/test_lists.py | 64 +- .../rulesets/phases/test_versions.py | 96 +- tests/api_resources/rulesets/test_phases.py | 88 +- tests/api_resources/rulesets/test_rules.py | 2076 ++++++++--------- tests/api_resources/rulesets/test_versions.py | 172 +- .../rulesets/versions/test_by_tag.py | 28 +- tests/api_resources/rum/test_rules.py | 96 +- tests/api_resources/rum/test_site_info.py | 64 +- .../api_resources/secondary_dns/test_acls.py | 60 +- .../api_resources/secondary_dns/test_peers.py | 64 +- .../api_resources/secondary_dns/test_tsigs.py | 60 +- tests/api_resources/snippets/test_content.py | 20 +- .../analytics/aggregates/test_currents.py | 20 +- .../spectrum/analytics/events/test_bytimes.py | 20 +- .../analytics/events/test_summaries.py | 20 +- tests/api_resources/spectrum/test_apps.py | 104 +- tests/api_resources/speed/pages/test_tests.py | 96 +- tests/api_resources/speed/test_pages.py | 48 +- tests/api_resources/speed/test_schedule.py | 72 +- .../ssl/test_certificate_packs.py | 60 +- tests/api_resources/ssl/test_verification.py | 20 +- .../stream/captions/language/test_vtt.py | 24 +- .../stream/captions/test_language.py | 96 +- .../stream/live_inputs/test_outputs.py | 92 +- .../api_resources/stream/test_audio_tracks.py | 96 +- tests/api_resources/stream/test_captions.py | 20 +- tests/api_resources/stream/test_downloads.py | 60 +- tests/api_resources/stream/test_embed.py | 20 +- tests/api_resources/stream/test_keys.py | 20 +- .../api_resources/stream/test_live_inputs.py | 72 +- tests/api_resources/stream/test_token.py | 24 +- tests/api_resources/stream/test_watermarks.py | 40 +- tests/api_resources/test_accounts.py | 4 +- tests/api_resources/test_ai_gateway.py | 64 +- tests/api_resources/test_brand_protection.py | 4 +- tests/api_resources/test_cache.py | 96 +- tests/api_resources/test_calls.py | 64 +- .../api_resources/test_client_certificates.py | 60 +- .../api_resources/test_custom_certificates.py | 64 +- tests/api_resources/test_custom_hostnames.py | 64 +- .../api_resources/test_custom_nameservers.py | 20 +- tests/api_resources/test_email_routing.py | 32 +- tests/api_resources/test_filters.py | 96 +- tests/api_resources/test_healthchecks.py | 88 +- tests/api_resources/test_ips.py | 4 +- .../test_keyless_certificates.py | 64 +- tests/api_resources/test_load_balancers.py | 88 +- tests/api_resources/test_memberships.py | 16 +- tests/api_resources/test_mtls_certificates.py | 40 +- .../test_origin_tls_client_auth.py | 40 +- tests/api_resources/test_pagerules.py | 88 +- tests/api_resources/test_pcaps.py | 20 +- tests/api_resources/test_plans.py | 20 +- tests/api_resources/test_queues.py | 60 +- tests/api_resources/test_rate_limits.py | 96 +- tests/api_resources/test_rulesets.py | 196 +- tests/api_resources/test_snippets.py | 64 +- tests/api_resources/test_stream.py | 40 +- tests/api_resources/test_subscriptions.py | 72 +- tests/api_resources/test_url_scanner.py | 46 +- tests/api_resources/test_waiting_rooms.py | 88 +- tests/api_resources/test_warp_connector.py | 84 +- tests/api_resources/test_zones.py | 12 +- tests/api_resources/url_scanner/test_scans.py | 160 +- tests/api_resources/user/test_invites.py | 16 +- .../api_resources/user/test_subscriptions.py | 48 +- tests/api_resources/user/test_tokens.py | 16 +- tests/api_resources/user/tokens/test_value.py | 12 +- tests/api_resources/vectorize/test_indexes.py | 172 +- .../waiting_rooms/events/test_details.py | 24 +- .../waiting_rooms/test_events.py | 152 +- .../api_resources/waiting_rooms/test_rules.py | 116 +- .../waiting_rooms/test_statuses.py | 20 +- .../content_lists/test_entries.py | 120 +- .../test_content_lists.py | 40 +- tests/api_resources/web3/test_hostnames.py | 84 +- .../workers/ai/models/test_schema.py | 16 +- .../workers/scripts/test_content.py | 52 +- .../workers/scripts/test_deployments.py | 48 +- .../workers/scripts/test_schedules.py | 40 +- .../workers/scripts/test_settings.py | 44 +- .../workers/scripts/test_tail.py | 64 +- .../workers/scripts/test_versions.py | 76 +- tests/api_resources/workers/test_ai.py | 328 +-- tests/api_resources/workers/test_domains.py | 40 +- tests/api_resources/workers/test_scripts.py | 156 +- .../namespaces/scripts/test_bindings.py | 24 +- .../namespaces/scripts/test_content.py | 60 +- .../namespaces/scripts/test_secrets.py | 52 +- .../namespaces/scripts/test_settings.py | 112 +- .../dispatch/namespaces/scripts/test_tags.py | 76 +- .../dispatch/namespaces/test_scripts.py | 172 +- .../dispatch/test_namespaces.py | 40 +- .../access/applications/test_cas.py | 176 +- .../access/applications/test_policies.py | 292 +-- .../applications/test_user_policy_checks.py | 44 +- .../access/certificates/test_settings.py | 40 +- .../zero_trust/access/test_applications.py | 992 ++++---- .../zero_trust/access/test_bookmarks.py | 80 +- .../zero_trust/access/test_certificates.py | 196 +- .../zero_trust/access/test_custom_pages.py | 108 +- .../zero_trust/access/test_groups.py | 196 +- .../zero_trust/access/test_policies.py | 72 +- .../zero_trust/access/test_service_tokens.py | 236 +- .../zero_trust/access/test_tags.py | 64 +- .../access/users/test_active_sessions.py | 44 +- .../access/users/test_failed_logins.py | 20 +- .../access/users/test_last_seen_identity.py | 20 +- .../devices/policies/test_excludes.py | 20 +- .../devices/policies/test_fallback_domains.py | 40 +- .../devices/policies/test_includes.py | 20 +- .../devices/posture/test_integrations.py | 64 +- .../zero_trust/devices/test_dex_tests.py | 112 +- .../zero_trust/devices/test_networks.py | 64 +- .../zero_trust/devices/test_override_codes.py | 20 +- .../zero_trust/devices/test_policies.py | 64 +- .../zero_trust/devices/test_posture.py | 64 +- .../dex/http_tests/test_percentiles.py | 28 +- .../zero_trust/dex/test_http_tests.py | 28 +- .../zero_trust/dex/test_tests.py | 8 +- .../zero_trust/dex/test_traceroute_tests.py | 96 +- .../dex/tests/test_unique_devices.py | 4 +- .../test_network_path.py | 20 +- .../zero_trust/dlp/datasets/test_upload.py | 92 +- .../zero_trust/dlp/profiles/test_custom.py | 64 +- .../dlp/profiles/test_predefined.py | 44 +- .../zero_trust/dlp/test_datasets.py | 176 +- .../zero_trust/dlp/test_profiles.py | 20 +- .../zero_trust/gateway/lists/test_items.py | 20 +- .../zero_trust/gateway/test_certificates.py | 40 +- .../zero_trust/gateway/test_configurations.py | 24 +- .../zero_trust/gateway/test_lists.py | 88 +- .../zero_trust/gateway/test_locations.py | 64 +- .../gateway/test_proxy_endpoints.py | 64 +- .../zero_trust/gateway/test_rules.py | 80 +- .../zero_trust/networks/routes/test_ips.py | 24 +- .../networks/routes/test_networks.py | 68 +- .../zero_trust/networks/test_routes.py | 44 +- .../networks/test_virtual_networks.py | 44 +- .../integrations/test_references.py | 36 +- .../risk_scoring/test_behaviours.py | 20 +- .../risk_scoring/test_integrations.py | 152 +- .../zero_trust/risk_scoring/test_summary.py | 20 +- .../api_resources/zero_trust/test_devices.py | 20 +- .../zero_trust/test_identity_providers.py | 1292 +++++----- .../zero_trust/test_organizations.py | 80 +- .../zero_trust/test_risk_scoring.py | 44 +- .../api_resources/zero_trust/test_tunnels.py | 64 +- .../zero_trust/tunnels/test_configurations.py | 124 +- .../zero_trust/tunnels/test_connections.py | 40 +- .../zero_trust/tunnels/test_connectors.py | 24 +- .../zero_trust/tunnels/test_management.py | 20 +- .../zero_trust/tunnels/test_token.py | 20 +- tests/api_resources/zones/test_holds.py | 4 +- tests/api_resources/zones/test_settings.py | 1140 ++++----- .../api_resources/zones/test_subscriptions.py | 24 +- 303 files changed, 11869 insertions(+), 11867 deletions(-) diff --git a/.stats.yml b/.stats.yml index aa5b891ae18..e1aa4a76cd9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08160758435c3d32f9f1d296fcd9664e5b67e7c453403bf02ac81f023ec470a3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml diff --git a/tests/api_resources/accounts/test_members.py b/tests/api_resources/accounts/test_members.py index 0b40f4dd9f3..3e000cb7f2c 100644 --- a/tests/api_resources/accounts/test_members.py +++ b/tests/api_resources/accounts/test_members.py @@ -355,7 +355,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: member = client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberUpdateResponse], member, path=["response"]) @@ -364,7 +364,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: member = client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -378,7 +378,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -391,7 +391,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -407,13 +407,13 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -421,7 +421,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: member = client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -468,7 +468,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -519,7 +519,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -573,7 +573,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", policies=[ { @@ -617,7 +617,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -713,7 +713,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: member = client.accounts.members.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) @@ -722,7 +722,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -735,7 +735,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -751,13 +751,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.delete( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -765,7 +765,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: member = client.accounts.members.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberGetResponse], member, path=["response"]) @@ -774,7 +774,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -787,7 +787,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -803,13 +803,13 @@ 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.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.get( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1148,7 +1148,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberUpdateResponse], member, path=["response"]) @@ -1157,7 +1157,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -1171,7 +1171,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1184,7 +1184,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -1200,13 +1200,13 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1214,7 +1214,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1261,7 +1261,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1312,7 +1312,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1366,7 +1366,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", policies=[ { @@ -1410,7 +1410,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1506,7 +1506,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) @@ -1515,7 +1515,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1528,7 +1528,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -1544,13 +1544,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.delete( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1558,7 +1558,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberGetResponse], member, path=["response"]) @@ -1567,7 +1567,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1580,7 +1580,7 @@ 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.accounts.members.with_streaming_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -1596,12 +1596,12 @@ 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.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.get( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py index 4236c1b2b13..49b18f2dade 100644 --- a/tests/api_resources/accounts/test_roles.py +++ b/tests/api_resources/accounts/test_roles.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: role = client.accounts.roles.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(object, role, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.roles.with_streaming_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -94,7 +94,7 @@ 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.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="", ) @@ -143,7 +143,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: role = await async_client.accounts.roles.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(object, role, path=["response"]) @@ -151,7 +151,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -163,7 +163,7 @@ 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.accounts.roles.with_streaming_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -178,6 +178,6 @@ 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.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="", ) diff --git a/tests/api_resources/addressing/address_maps/test_accounts.py b/tests/api_resources/addressing/address_maps/test_accounts.py index 048fa6d00a5..4010149e6ea 100644 --- a/tests/api_resources/addressing/address_maps/test_accounts.py +++ b/tests/api_resources/addressing/address_maps/test_accounts.py @@ -20,7 +20,7 @@ class TestAccounts: @parametrize def test_method_update(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.update( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) @@ -81,7 +81,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncAccounts: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -134,7 +134,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.update( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -178,7 +178,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/address_maps/test_ips.py b/tests/api_resources/addressing/address_maps/test_ips.py index 418da599930..8c957cb7f53 100644 --- a/tests/api_resources/addressing/address_maps/test_ips.py +++ b/tests/api_resources/addressing/address_maps/test_ips.py @@ -20,7 +20,7 @@ class TestIPs: @parametrize def test_method_update(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -44,7 +44,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -69,7 +69,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", body={}, @@ -77,7 +77,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): client.addressing.address_maps.ips.with_raw_response.update( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -86,7 +86,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -95,7 +95,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -108,7 +108,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -124,21 +124,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): client.addressing.address_maps.ips.with_raw_response.delete( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -150,7 +150,7 @@ class TestAsyncIPs: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -160,7 +160,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -174,7 +174,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -191,7 +191,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -199,7 +199,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", body={}, @@ -207,7 +207,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.update( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -216,7 +216,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -225,7 +225,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -254,21 +254,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.delete( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/address_maps/test_zones.py b/tests/api_resources/addressing/address_maps/test_zones.py index 2eb4c69d4b1..15ab975e8ed 100644 --- a/tests/api_resources/addressing/address_maps/test_zones.py +++ b/tests/api_resources/addressing/address_maps/test_zones.py @@ -20,7 +20,7 @@ class TestZones: @parametrize def test_method_update(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -44,7 +44,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -69,7 +69,7 @@ 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.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, @@ -77,7 +77,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -86,7 +86,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -95,7 +95,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -108,7 +108,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -124,21 +124,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -150,7 +150,7 @@ class TestAsyncZones: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -160,7 +160,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -174,7 +174,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -191,7 +191,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -199,7 +199,7 @@ 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.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, @@ -207,7 +207,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -216,7 +216,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -225,7 +225,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -254,21 +254,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/loa_documents/test_downloads.py b/tests/api_resources/addressing/loa_documents/test_downloads.py index 5c401decdfe..b4ff36279c0 100644 --- a/tests/api_resources/addressing/loa_documents/test_downloads.py +++ b/tests/api_resources/addressing/loa_documents/test_downloads.py @@ -33,7 +33,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.addressing.loa_documents.downloads.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -52,7 +52,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -71,7 +71,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.addressing.loa_documents.downloads.with_streaming_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -91,13 +91,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter 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.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `loa_document_id` but received ''"): client.addressing.loa_documents.downloads.with_raw_response.get( - "", + loa_document_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -115,7 +115,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.addressing.loa_documents.downloads.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -134,7 +134,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -153,7 +153,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.addressing.loa_documents.downloads.with_streaming_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -173,12 +173,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx 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.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `loa_document_id` but received ''"): await async_client.addressing.loa_documents.downloads.with_raw_response.get( - "", + loa_document_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py index 00ba32f6d14..1fca628ca73 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py @@ -21,7 +21,7 @@ class TestBindings: @parametrize def test_method_create(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -51,7 +51,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -66,20 +66,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[ServiceBinding], binding, path=["response"]) @@ -87,7 +87,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,20 +114,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -165,21 +165,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -196,7 +196,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -225,21 +225,21 @@ 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.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -251,7 +251,7 @@ class TestAsyncBindings: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) @@ -259,7 +259,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", @@ -269,7 +269,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -281,7 +281,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -296,20 +296,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[ServiceBinding], binding, path=["response"]) @@ -317,7 +317,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -329,7 +329,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -344,20 +344,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -366,7 +366,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -379,7 +379,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -395,21 +395,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -417,7 +417,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -426,7 +426,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -439,7 +439,7 @@ 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.addressing.prefixes.bgp.bindings.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -455,21 +455,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.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py index 26c21604b3d..c0486fa677a 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py @@ -21,7 +21,7 @@ class TestPrefixes: @parametrize def test_method_list(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[BGPPrefix], prefix, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -56,20 +56,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -78,7 +78,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", on_demand={"advertised": True}, @@ -88,7 +88,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -101,7 +101,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -117,21 +117,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -148,7 +148,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -161,7 +161,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -177,21 +177,21 @@ 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.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -203,7 +203,7 @@ class TestAsyncPrefixes: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[BGPPrefix], prefix, path=["response"]) @@ -211,7 +211,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,20 +238,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", on_demand={"advertised": True}, @@ -270,7 +270,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -283,7 +283,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -299,21 +299,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -321,7 +321,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -330,7 +330,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -343,7 +343,7 @@ 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.addressing.prefixes.bgp.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -359,21 +359,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.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/bgp/test_statuses.py b/tests/api_resources/addressing/prefixes/bgp/test_statuses.py index 50503a8f33f..3a1bf7f4e57 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_statuses.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_statuses.py @@ -20,7 +20,7 @@ class TestStatuses: @parametrize def test_method_edit(self, client: Cloudflare) -> None: status = client.addressing.prefixes.bgp.statuses.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -29,7 +29,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -42,7 +42,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.statuses.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", advertised=True, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -73,7 +73,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: status = client.addressing.prefixes.bgp.statuses.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) @@ -81,7 +81,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.statuses.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ 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.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncStatuses: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: status = await async_client.addressing.prefixes.bgp.statuses.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -134,7 +134,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -147,7 +147,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.statuses.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", advertised=True, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -178,7 +178,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: status = await async_client.addressing.prefixes.bgp.statuses.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ 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.addressing.prefixes.bgp.statuses.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ 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.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py index 0ee088ab967..dd17a7ac44b 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -21,7 +21,7 @@ class TestDelegations: @parametrize def test_method_create(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -62,7 +62,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -70,7 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -79,7 +79,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Delegations], delegation, path=["response"]) @@ -87,7 +87,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,20 +114,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -165,21 +165,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.delete( - "", + delegation_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -191,7 +191,7 @@ class TestAsyncDelegations: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -201,7 +201,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -215,7 +215,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -232,7 +232,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -240,7 +240,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -249,7 +249,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Delegations], delegation, path=["response"]) @@ -257,7 +257,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -269,7 +269,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -284,20 +284,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -306,7 +306,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -319,7 +319,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -335,21 +335,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.delete( - "", + delegation_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py index f8e982e4260..e38cf946883 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -130,7 +130,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) @@ -138,7 +138,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -150,7 +150,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -165,20 +165,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) @@ -186,7 +186,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", default_sni="*.example.com", description="My Ecommerce zones", @@ -197,7 +197,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -224,20 +224,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.edit( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) @@ -245,7 +245,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -257,7 +257,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -272,13 +272,13 @@ 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.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.get( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -427,20 +427,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) @@ -448,7 +448,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", default_sni="*.example.com", description="My Ecommerce zones", @@ -459,7 +459,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -471,7 +471,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -486,20 +486,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.edit( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) @@ -507,7 +507,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -519,7 +519,7 @@ 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.addressing.address_maps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -534,12 +534,12 @@ 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.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.get( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py index b26d7471d10..7b593cbebbf 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -109,7 +109,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) @@ -117,7 +117,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -129,7 +129,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -144,20 +144,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.delete( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -166,7 +166,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -179,7 +179,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) as response: @@ -195,14 +195,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", description="Internal test prefix", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -210,7 +210,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @@ -218,7 +218,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -230,7 +230,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -245,13 +245,13 @@ 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.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -350,7 +350,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) @@ -358,7 +358,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -370,7 +370,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -385,20 +385,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.delete( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -407,7 +407,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -420,7 +420,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) as response: @@ -436,14 +436,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", description="Internal test prefix", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -451,7 +451,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @@ -459,7 +459,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -471,7 +471,7 @@ 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.addressing.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -486,12 +486,12 @@ 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.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/test_regional_hostnames.py b/tests/api_resources/addressing/test_regional_hostnames.py index 3dc5d085fba..bb0cf870331 100644 --- a/tests/api_resources/addressing/test_regional_hostnames.py +++ b/tests/api_resources/addressing/test_regional_hostnames.py @@ -111,7 +111,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: regional_hostname = client.addressing.regional_hostnames.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"]) @@ -119,7 +119,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.regional_hostnames.with_streaming_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -146,20 +146,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.addressing.regional_hostnames.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: regional_hostname = client.addressing.regional_hostnames.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -168,7 +168,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -181,7 +181,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.regional_hostnames.with_streaming_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) as response: @@ -197,14 +197,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="", region_key="ca", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.addressing.regional_hostnames.with_raw_response.edit( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -212,7 +212,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: regional_hostname = client.addressing.regional_hostnames.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"]) @@ -220,7 +220,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -232,7 +232,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.regional_hostnames.with_streaming_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -247,13 +247,13 @@ 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 `zone_id` but received ''"): client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.addressing.regional_hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -348,7 +348,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: regional_hostname = await async_client.addressing.regional_hostnames.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"]) @@ -356,7 +356,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -368,7 +368,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.regional_hostnames.with_streaming_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -383,20 +383,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: regional_hostname = await async_client.addressing.regional_hostnames.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -405,7 +405,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -418,7 +418,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.regional_hostnames.with_streaming_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) as response: @@ -434,14 +434,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="", region_key="ca", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.edit( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -449,7 +449,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: regional_hostname = await async_client.addressing.regional_hostnames.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"]) @@ -457,7 +457,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -469,7 +469,7 @@ 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.addressing.regional_hostnames.with_streaming_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -484,12 +484,12 @@ 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 `zone_id` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 79fbfbf7ca0..7bcb2da715a 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -22,7 +22,7 @@ class TestLogs: @parametrize def test_method_list(self, client: Cloudflare) -> None: log = client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(SyncV4PagePaginationArray[LogListResponse], log, path=["response"]) @@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: log = client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", cached=True, direction="asc", @@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: order_by="created_at", page=1, per_page=5, - search="string", + search="search", start_date=parse_datetime("2019-12-27T18:11:19.117Z"), success=True, ) @@ -47,7 +47,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.ai_gateway.logs.with_raw_response.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @@ -59,7 +59,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.ai_gateway.logs.with_streaming_response.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed @@ -74,13 +74,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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", + id="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( - "", + id="", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @@ -91,7 +91,7 @@ class TestAsyncLogs: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: log = await async_client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(AsyncV4PagePaginationArray[LogListResponse], log, path=["response"]) @@ -99,7 +99,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: log = await async_client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", cached=True, direction="asc", @@ -107,7 +107,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) order_by="created_at", page=1, per_page=5, - search="string", + search="search", start_date=parse_datetime("2019-12-27T18:11:19.117Z"), success=True, ) @@ -116,7 +116,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @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", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @@ -128,7 +128,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @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", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed @@ -143,12 +143,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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", + id="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( - "", + id="", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) diff --git a/tests/api_resources/alerting/destinations/test_pagerduty.py b/tests/api_resources/alerting/destinations/test_pagerduty.py index a0b32fc9ce4..05247187082 100644 --- a/tests/api_resources/alerting/destinations/test_pagerduty.py +++ b/tests/api_resources/alerting/destinations/test_pagerduty.py @@ -154,7 +154,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: @parametrize def test_method_link(self, client: Cloudflare) -> None: pagerduty = client.alerting.destinations.pagerduty.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PagerdutyLinkResponse], pagerduty, path=["response"]) @@ -165,7 +165,7 @@ def test_method_link(self, client: Cloudflare) -> None: @parametrize def test_raw_response_link(self, client: Cloudflare) -> None: response = client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -180,7 +180,7 @@ def test_raw_response_link(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_link(self, client: Cloudflare) -> None: with client.alerting.destinations.pagerduty.with_streaming_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -198,13 +198,13 @@ def test_streaming_response_link(self, client: Cloudflare) -> None: def test_path_params_link(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): client.alerting.destinations.pagerduty.with_raw_response.link( - "", + token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -344,7 +344,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_link(self, async_client: AsyncCloudflare) -> None: pagerduty = await async_client.alerting.destinations.pagerduty.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PagerdutyLinkResponse], pagerduty, path=["response"]) @@ -355,7 +355,7 @@ async def test_method_link(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -370,7 +370,7 @@ async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.pagerduty.with_streaming_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -388,12 +388,12 @@ async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> N async def test_path_params_link(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): await async_client.alerting.destinations.pagerduty.with_raw_response.link( - "", + token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py index bf8bc07acdf..ea816e0bdbf 100644 --- a/tests/api_resources/alerting/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/destinations/test_webhooks.py @@ -44,7 +44,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookCreateResponse], webhook, path=["response"]) @@ -100,7 +100,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -113,11 +113,11 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) @@ -127,7 +127,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -144,7 +144,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -164,7 +164,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -172,7 +172,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.update( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -219,7 +219,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WebhookDeleteResponse, webhook, path=["response"]) @@ -227,7 +227,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -239,7 +239,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -254,13 +254,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.delete( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Webhooks], webhook, path=["response"]) @@ -281,7 +281,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -296,7 +296,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -314,13 +314,13 @@ 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.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.get( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,7 +349,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookCreateResponse], webhook, path=["response"]) @@ -405,7 +405,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -418,11 +418,11 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) @@ -432,7 +432,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -449,7 +449,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -469,7 +469,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -477,7 +477,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.update( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -524,7 +524,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WebhookDeleteResponse, webhook, path=["response"]) @@ -532,7 +532,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -544,7 +544,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -559,13 +559,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.delete( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -575,7 +575,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Webhooks], webhook, path=["response"]) @@ -586,7 +586,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -601,7 +601,7 @@ 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.alerting.destinations.webhooks.with_streaming_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -619,12 +619,12 @@ 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.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.get( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py index 7f5b50e9c10..b88cc65631a 100644 --- a/tests/api_resources/alerting/test_policies.py +++ b/tests/api_resources/alerting/test_policies.py @@ -172,7 +172,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -183,7 +183,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", alert_type="universal_ssl_event_type", description="Something describing the policy.", @@ -245,7 +245,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -278,13 +278,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.alerting.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -329,7 +329,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.alerting.policies.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PolicyDeleteResponse, policy, path=["response"]) @@ -337,7 +337,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,7 +349,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -364,13 +364,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.alerting.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -380,7 +380,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.alerting.policies.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -391,7 +391,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -406,7 +406,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -424,13 +424,13 @@ 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.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.alerting.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -587,7 +587,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -598,7 +598,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", alert_type="universal_ssl_event_type", description="Something describing the policy.", @@ -660,7 +660,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -675,7 +675,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -693,13 +693,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.alerting.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -744,7 +744,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PolicyDeleteResponse, policy, path=["response"]) @@ -752,7 +752,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -764,7 +764,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -779,13 +779,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.alerting.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -795,7 +795,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -806,7 +806,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -821,7 +821,7 @@ 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.alerting.policies.with_streaming_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -839,12 +839,12 @@ 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.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.alerting.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/discovery/test_operations.py b/tests/api_resources/api_gateway/discovery/test_operations.py index 3318acf896a..f88028bff92 100644 --- a/tests/api_resources/api_gateway/discovery/test_operations.py +++ b/tests/api_resources/api_gateway/discovery/test_operations.py @@ -77,7 +77,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: operation = client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationEditResponse, operation, path=["response"]) @@ -85,7 +85,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: operation = client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", state="review", ) @@ -94,7 +94,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.api_gateway.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -106,7 +106,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.api_gateway.discovery.operations.with_streaming_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -121,13 +121,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.discovery.operations.with_raw_response.edit( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -193,7 +193,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationEditResponse, operation, path=["response"]) @@ -201,7 +201,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", state="review", ) @@ -210,7 +210,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -222,7 +222,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.discovery.operations.with_streaming_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -237,12 +237,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.discovery.operations.with_raw_response.edit( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/operations/test_schema_validation.py b/tests/api_resources/api_gateway/operations/test_schema_validation.py index c821655f2da..21c19d6c184 100644 --- a/tests/api_resources/api_gateway/operations/test_schema_validation.py +++ b/tests/api_resources/api_gateway/operations/test_schema_validation.py @@ -24,7 +24,7 @@ class TestSchemaValidation: @parametrize def test_method_update(self, client: Cloudflare) -> None: schema_validation = client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @@ -32,7 +32,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: schema_validation = client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", mitigation_action="block", ) @@ -41,7 +41,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.api_gateway.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.api_gateway.operations.schema_validation.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,13 +68,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.update( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -135,7 +135,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: schema_validation = client.api_gateway.operations.schema_validation.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) @@ -143,7 +143,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -155,7 +155,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.api_gateway.operations.schema_validation.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -170,13 +170,13 @@ 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 `zone_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ class TestAsyncSchemaValidation: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: schema_validation = await async_client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @@ -195,7 +195,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: schema_validation = await async_client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", mitigation_action="block", ) @@ -204,7 +204,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.operations.schema_validation.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -231,13 +231,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(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.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.schema_validation.with_raw_response.update( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -298,7 +298,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schema_validation = await async_client.api_gateway.operations.schema_validation.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) @@ -306,7 +306,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -318,7 +318,7 @@ 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.api_gateway.operations.schema_validation.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -333,12 +333,12 @@ 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 `zone_id` but received ''"): await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/test_operations.py b/tests/api_resources/api_gateway/test_operations.py index 6c0d2194715..e6b994c1ebb 100644 --- a/tests/api_resources/api_gateway/test_operations.py +++ b/tests/api_resources/api_gateway/test_operations.py @@ -184,7 +184,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: operation = client.api_gateway.operations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationDeleteResponse, operation, path=["response"]) @@ -192,7 +192,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.api_gateway.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -204,7 +204,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.api_gateway.operations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -219,20 +219,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.with_raw_response.delete( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: operation = client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(APIShield, operation, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: operation = client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", feature=["thresholds"], ) @@ -249,7 +249,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -261,7 +261,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.api_gateway.operations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -276,13 +276,13 @@ 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 `zone_id` but received ''"): client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -452,7 +452,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.operations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationDeleteResponse, operation, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -472,7 +472,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.operations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -487,20 +487,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(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.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.with_raw_response.delete( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(APIShield, operation, path=["response"]) @@ -508,7 +508,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", feature=["thresholds"], ) @@ -517,7 +517,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -529,7 +529,7 @@ 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.api_gateway.operations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -544,12 +544,12 @@ 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 `zone_id` but received ''"): await async_client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/test_user_schemas.py b/tests/api_resources/api_gateway/test_user_schemas.py index dddeafd45e8..e4b1af33b96 100644 --- a/tests/api_resources/api_gateway/test_user_schemas.py +++ b/tests/api_resources/api_gateway/test_user_schemas.py @@ -131,7 +131,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) @@ -139,7 +139,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -151,7 +151,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -166,20 +166,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.delete( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -187,7 +187,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_enabled=True, ) @@ -196,7 +196,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -208,7 +208,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.with_streaming_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -223,20 +223,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.edit( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -244,7 +244,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", omit_source=True, ) @@ -253,7 +253,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -265,7 +265,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -280,13 +280,13 @@ 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 `zone_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.get( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -403,7 +403,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) @@ -411,7 +411,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -423,7 +423,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.user_schemas.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -438,20 +438,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(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.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.delete( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -459,7 +459,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_enabled=True, ) @@ -468,7 +468,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -480,7 +480,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.user_schemas.with_streaming_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -495,20 +495,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.edit( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -516,7 +516,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", omit_source=True, ) @@ -525,7 +525,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -537,7 +537,7 @@ 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.api_gateway.user_schemas.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -552,12 +552,12 @@ 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 `zone_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.get( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/user_schemas/test_operations.py b/tests/api_resources/api_gateway/user_schemas/test_operations.py index ff5257f64c9..a613b248c2a 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_operations.py +++ b/tests/api_resources/api_gateway/user_schemas/test_operations.py @@ -21,7 +21,7 @@ class TestOperations: @parametrize def test_method_list(self, client: Cloudflare) -> None: operation = client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[OperationListResponse], operation, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: operation = client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", endpoint="/api/v1", feature=["thresholds"], @@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -56,7 +56,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.operations.with_streaming_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -71,13 +71,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.operations.with_raw_response.list( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -88,7 +88,7 @@ class TestAsyncOperations: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[OperationListResponse], operation, path=["response"]) @@ -96,7 +96,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", endpoint="/api/v1", feature=["thresholds"], @@ -111,7 +111,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -123,7 +123,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.user_schemas.operations.with_streaming_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -138,12 +138,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(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.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/calls/turn/test_keys.py b/tests/api_resources/calls/turn/test_keys.py index 65c537af125..c0359f2da99 100644 --- a/tests/api_resources/calls/turn/test_keys.py +++ b/tests/api_resources/calls/turn/test_keys.py @@ -70,7 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: key = client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -78,7 +78,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: key = client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="my-turn-key", ) @@ -87,7 +87,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.calls.turn.keys.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,13 +114,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): client.calls.turn.keys.with_raw_response.update( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -165,7 +165,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.calls.turn.keys.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -173,7 +173,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -185,7 +185,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.calls.turn.keys.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -200,20 +200,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): client.calls.turn.keys.with_raw_response.delete( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: key = client.calls.turn.keys.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -221,7 +221,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -233,7 +233,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.calls.turn.keys.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -248,13 +248,13 @@ 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.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): client.calls.turn.keys.with_raw_response.get( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -311,7 +311,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -319,7 +319,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="my-turn-key", ) @@ -328,7 +328,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -340,7 +340,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.turn.keys.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -355,13 +355,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.update( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -406,7 +406,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -414,7 +414,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -426,7 +426,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.turn.keys.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -441,20 +441,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.delete( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -462,7 +462,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -474,7 +474,7 @@ 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.calls.turn.keys.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -489,12 +489,12 @@ 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.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.get( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/challenges/test_widgets.py b/tests/api_resources/challenges/test_widgets.py index 4182376aa3d..5aee8ea8221 100644 --- a/tests/api_resources/challenges/test_widgets.py +++ b/tests/api_resources/challenges/test_widgets.py @@ -92,7 +92,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: widget = client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -103,7 +103,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -117,7 +117,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -132,7 +132,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -150,7 +150,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -159,7 +159,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.update( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -218,7 +218,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: widget = client.challenges.widgets.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -226,7 +226,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -253,20 +253,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.delete( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: widget = client.challenges.widgets.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -274,7 +274,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -286,7 +286,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -301,20 +301,20 @@ 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.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.get( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_rotate_secret(self, client: Cloudflare) -> None: widget = client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -322,7 +322,7 @@ def test_method_rotate_secret(self, client: Cloudflare) -> None: @parametrize def test_method_rotate_secret_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) @@ -331,7 +331,7 @@ def test_method_rotate_secret_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rotate_secret(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -343,7 +343,7 @@ def test_raw_response_rotate_secret(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rotate_secret(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -358,13 +358,13 @@ def test_streaming_response_rotate_secret(self, client: Cloudflare) -> None: def test_path_params_rotate_secret(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.rotate_secret( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -443,7 +443,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -454,7 +454,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -468,7 +468,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -483,7 +483,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -501,7 +501,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -510,7 +510,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.update( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -569,7 +569,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -577,7 +577,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -589,7 +589,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -604,20 +604,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.delete( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -625,7 +625,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -637,7 +637,7 @@ 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.challenges.widgets.with_streaming_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -652,20 +652,20 @@ 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.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.get( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_rotate_secret(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -673,7 +673,7 @@ async def test_method_rotate_secret(self, async_client: AsyncCloudflare) -> None @parametrize async def test_method_rotate_secret_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) @@ -682,7 +682,7 @@ async def test_method_rotate_secret_with_all_params(self, async_client: AsyncClo @parametrize async def test_raw_response_rotate_secret(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -694,7 +694,7 @@ async def test_raw_response_rotate_secret(self, async_client: AsyncCloudflare) - @parametrize async def test_streaming_response_rotate_secret(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -709,12 +709,12 @@ async def test_streaming_response_rotate_secret(self, async_client: AsyncCloudfl async def test_path_params_rotate_secret(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.rotate_secret( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py index e804d3ab846..af281c7eb9f 100644 --- a/tests/api_resources/cloudforce_one/requests/test_message.py +++ b/tests/api_resources/cloudforce_one/requests/test_message.py @@ -25,7 +25,7 @@ class TestMessage: @parametrize def test_method_create(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Message], message, path=["response"]) @@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -69,20 +69,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.create( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -91,7 +91,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", content="What regions were most effected by the recent DoS?", @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -118,7 +118,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -134,14 +134,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -149,7 +149,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -158,7 +158,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -171,7 +171,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -187,14 +187,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -202,7 +202,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -212,7 +212,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -226,7 +226,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -240,7 +240,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -257,7 +257,7 @@ 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_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", page=0, per_page=10, @@ -265,7 +265,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -278,7 +278,7 @@ class TestAsyncMessage: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Message], message, path=["response"]) @@ -286,7 +286,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) @@ -295,7 +295,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -307,7 +307,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -322,20 +322,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.create( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -344,7 +344,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", content="What regions were most effected by the recent DoS?", @@ -358,7 +358,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -371,7 +371,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -387,14 +387,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -402,7 +402,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -411,7 +411,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -424,7 +424,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -440,14 +440,14 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -455,7 +455,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -465,7 +465,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -479,7 +479,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -493,7 +493,7 @@ 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.cloudforce_one.requests.message.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -510,7 +510,7 @@ 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_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", page=0, per_page=10, @@ -518,7 +518,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, diff --git a/tests/api_resources/cloudforce_one/requests/test_priority.py b/tests/api_resources/cloudforce_one/requests/test_priority.py index 012e01b34cf..a3078846680 100644 --- a/tests/api_resources/cloudforce_one/requests/test_priority.py +++ b/tests/api_resources/cloudforce_one/requests/test_priority.py @@ -24,7 +24,7 @@ class TestPriority: @parametrize def test_method_create(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -68,7 +68,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.create( - "", + account_identifier="", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -78,7 +78,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -90,7 +90,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -106,7 +106,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -125,7 +125,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", labels=["DoS", "CVE"], priority=1, @@ -135,7 +135,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.update( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -146,7 +146,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) @@ -154,7 +154,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -166,7 +166,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -181,20 +181,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.delete( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], priority, path=["response"]) @@ -202,7 +202,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -214,7 +214,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -229,13 +229,13 @@ 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_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.get( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ class TestAsyncPriority: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -295,7 +295,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -310,7 +310,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -328,7 +328,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.create( - "", + account_identifier="", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -338,7 +338,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -350,7 +350,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -366,7 +366,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -385,7 +385,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", labels=["DoS", "CVE"], priority=1, @@ -395,7 +395,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.update( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -406,7 +406,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) @@ -414,7 +414,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -426,7 +426,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -441,20 +441,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.delete( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], priority, path=["response"]) @@ -462,7 +462,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -474,7 +474,7 @@ 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.cloudforce_one.requests.priority.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -489,13 +489,13 @@ 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_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.get( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/cloudforce_one/test_requests.py b/tests/api_resources/cloudforce_one/test_requests.py index 9e43e1a22b2..53ea792ef95 100644 --- a/tests/api_resources/cloudforce_one/test_requests.py +++ b/tests/api_resources/cloudforce_one/test_requests.py @@ -29,14 +29,14 @@ class TestRequests: @parametrize def test_method_create(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", request_type="Victomology", @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,13 +73,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.create( - "", + account_identifier="", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -87,7 +87,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", @@ -100,7 +100,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,20 +127,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.update( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -149,7 +149,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, completed_after=parse_datetime("2022-01-01T00:00:00Z"), @@ -166,7 +166,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -179,7 +179,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) as response: @@ -195,7 +195,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.list( - "", + account_identifier="", page=0, per_page=10, ) @@ -203,7 +203,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RequestDeleteResponse, request, path=["response"]) @@ -211,7 +211,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.delete( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -289,7 +289,7 @@ def test_path_params_constants(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -297,7 +297,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -309,7 +309,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -324,13 +324,13 @@ 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_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -417,14 +417,14 @@ class TestAsyncRequests: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", request_type="Victomology", @@ -436,7 +436,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -447,7 +447,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -461,13 +461,13 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.create( - "", + account_identifier="", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -475,7 +475,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", @@ -488,7 +488,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -500,7 +500,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -515,20 +515,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.update( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -537,7 +537,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, completed_after=parse_datetime("2022-01-01T00:00:00Z"), @@ -554,7 +554,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -567,7 +567,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) as response: @@ -583,7 +583,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.list( - "", + account_identifier="", page=0, per_page=10, ) @@ -591,7 +591,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RequestDeleteResponse, request, path=["response"]) @@ -599,7 +599,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -611,7 +611,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -626,13 +626,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.delete( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -677,7 +677,7 @@ async def test_path_params_constants(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -685,7 +685,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -697,7 +697,7 @@ 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.cloudforce_one.requests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -712,13 +712,13 @@ 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_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py index 68fd53cc39b..58ce4be1a90 100644 --- a/tests/api_resources/d1/test_database.py +++ b/tests/api_resources/d1/test_database.py @@ -78,7 +78,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", page=1, per_page=10, ) @@ -118,7 +118,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: database = client.d1.database.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) @@ -126,7 +126,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -138,7 +138,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -153,20 +153,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.delete( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: database = client.d1.database.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(D1, database, path=["response"]) @@ -174,7 +174,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -186,7 +186,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -201,20 +201,20 @@ 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.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.get( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_query(self, client: Cloudflare) -> None: database = client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -223,7 +223,7 @@ def test_method_query(self, client: Cloudflare) -> None: @parametrize def test_method_query_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -233,7 +233,7 @@ def test_method_query_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_query(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -246,7 +246,7 @@ def test_raw_response_query(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_query(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -262,14 +262,14 @@ def test_streaming_response_query(self, client: Cloudflare) -> None: def test_path_params_query(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.query( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -277,7 +277,7 @@ def test_path_params_query(self, client: Cloudflare) -> None: @parametrize def test_method_raw(self, client: Cloudflare) -> None: database = client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -286,7 +286,7 @@ def test_method_raw(self, client: Cloudflare) -> None: @parametrize def test_method_raw_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -296,7 +296,7 @@ def test_method_raw_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_raw(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -309,7 +309,7 @@ def test_raw_response_raw(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_raw(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -325,14 +325,14 @@ def test_streaming_response_raw(self, client: Cloudflare) -> None: def test_path_params_raw(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.raw( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -394,7 +394,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", page=1, per_page=10, ) @@ -434,7 +434,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) @@ -442,7 +442,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,20 +469,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.delete( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(D1, database, path=["response"]) @@ -490,7 +490,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -502,7 +502,7 @@ 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.d1.database.with_streaming_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -517,20 +517,20 @@ 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.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.get( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_query(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -539,7 +539,7 @@ async def test_method_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -549,7 +549,7 @@ async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -562,7 +562,7 @@ async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -578,14 +578,14 @@ async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.query( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -593,7 +593,7 @@ async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_raw(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -602,7 +602,7 @@ async def test_method_raw(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_raw_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -612,7 +612,7 @@ async def test_method_raw_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_raw(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -625,7 +625,7 @@ async def test_raw_response_raw(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_raw(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -641,14 +641,14 @@ async def test_streaming_response_raw(self, async_client: AsyncCloudflare) -> No async def test_path_params_raw(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.raw( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) diff --git a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py index 0aa48692e20..8b22e6d0ee0 100644 --- a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py @@ -21,7 +21,7 @@ class TestBytimes: @parametrize def test_method_get(self, client: Cloudflare) -> None: bytime = client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bytime = client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -45,7 +45,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -57,7 +57,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.analytics.reports.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -72,13 +72,13 @@ 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.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -89,7 +89,7 @@ class TestAsyncBytimes: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) @@ -97,7 +97,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -113,7 +113,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ 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.dns.firewall.analytics.reports.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -140,12 +140,12 @@ 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.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/firewall/analytics/test_reports.py b/tests/api_resources/dns/firewall/analytics/test_reports.py index 985ac0d448f..ebdb5cad0c1 100644 --- a/tests/api_resources/dns/firewall/analytics/test_reports.py +++ b/tests/api_resources/dns/firewall/analytics/test_reports.py @@ -21,7 +21,7 @@ class TestReports: @parametrize def test_method_get(self, client: Cloudflare) -> None: report = client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Report], report, path=["response"]) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: report = client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -44,7 +44,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -56,7 +56,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.analytics.reports.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -71,13 +71,13 @@ 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.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.analytics.reports.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -88,7 +88,7 @@ class TestAsyncReports: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Report], report, path=["response"]) @@ -96,7 +96,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -111,7 +111,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -123,7 +123,7 @@ 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.dns.firewall.analytics.reports.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -138,12 +138,12 @@ 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.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.analytics.reports.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/test_firewall.py b/tests/api_resources/dns/test_firewall.py index b1aa07bd8df..aac76b89adc 100644 --- a/tests/api_resources/dns/test_firewall.py +++ b/tests/api_resources/dns/test_firewall.py @@ -137,7 +137,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: firewall = client.dns.firewall.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @@ -145,7 +145,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -157,7 +157,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -172,20 +172,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.with_raw_response.delete( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -201,7 +201,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -224,7 +224,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -244,7 +244,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -267,7 +267,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -281,7 +281,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.with_raw_response.edit( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -296,7 +296,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: firewall = client.dns.firewall.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Firewall], firewall, path=["response"]) @@ -304,7 +304,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -316,7 +316,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -331,13 +331,13 @@ 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.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -461,7 +461,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @@ -469,7 +469,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -481,7 +481,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -496,20 +496,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.with_raw_response.delete( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -525,7 +525,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -548,7 +548,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -568,7 +568,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -591,7 +591,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -605,7 +605,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.with_raw_response.edit( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -620,7 +620,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Firewall], firewall, path=["response"]) @@ -628,7 +628,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -640,7 +640,7 @@ 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.dns.firewall.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -655,12 +655,12 @@ 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.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 55ae9e690a8..532f10ae713 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -182,7 +182,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -254,7 +254,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -400,7 +400,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -472,7 +472,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -774,12 +774,12 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -988,7 +988,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -1140,7 +1140,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -1285,7 +1285,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -1492,7 +1492,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1504,7 +1504,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1521,7 +1521,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1537,7 +1537,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1556,7 +1556,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -1565,7 +1565,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1576,7 +1576,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1588,7 +1588,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1605,7 +1605,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1621,7 +1621,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1640,7 +1640,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -1649,7 +1649,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1660,7 +1660,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1672,12 +1672,12 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -1692,7 +1692,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1708,7 +1708,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1727,7 +1727,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -1736,7 +1736,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1747,7 +1747,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1759,11 +1759,11 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -1780,7 +1780,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1796,7 +1796,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1815,7 +1815,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -1824,7 +1824,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1835,7 +1835,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1847,7 +1847,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1864,7 +1864,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1880,7 +1880,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1899,7 +1899,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -1908,7 +1908,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1919,7 +1919,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1931,13 +1931,13 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -1952,7 +1952,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1968,7 +1968,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1987,7 +1987,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -1996,7 +1996,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2007,7 +2007,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2019,11 +2019,11 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -2040,7 +2040,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2056,7 +2056,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2075,7 +2075,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2084,7 +2084,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2095,7 +2095,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2107,7 +2107,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -2127,7 +2127,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2143,7 +2143,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2162,7 +2162,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2171,7 +2171,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2182,7 +2182,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2194,7 +2194,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -2223,7 +2223,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2239,7 +2239,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2258,7 +2258,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2267,7 +2267,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2278,7 +2278,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2291,7 +2291,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2308,7 +2308,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2325,7 +2325,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2345,7 +2345,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -2355,7 +2355,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2367,7 +2367,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2379,15 +2379,15 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -2402,7 +2402,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2418,7 +2418,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2437,7 +2437,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2446,7 +2446,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2457,7 +2457,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2469,7 +2469,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2485,7 +2485,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2501,7 +2501,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2520,7 +2520,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -2529,7 +2529,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2540,7 +2540,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2552,7 +2552,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2568,7 +2568,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2584,7 +2584,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2603,7 +2603,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -2612,7 +2612,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2623,7 +2623,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2635,10 +2635,10 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -2656,7 +2656,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2672,7 +2672,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2691,7 +2691,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2700,7 +2700,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2711,7 +2711,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2723,7 +2723,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -2747,7 +2747,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2763,7 +2763,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2782,7 +2782,7 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -2791,7 +2791,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2802,7 +2802,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2814,11 +2814,11 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -2834,7 +2834,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2850,7 +2850,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2869,7 +2869,7 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2878,7 +2878,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2889,7 +2889,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2901,7 +2901,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -2921,7 +2921,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2937,7 +2937,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2956,7 +2956,7 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2965,7 +2965,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2976,7 +2976,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2988,10 +2988,10 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -3009,7 +3009,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3025,7 +3025,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3044,7 +3044,7 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3053,7 +3053,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3064,7 +3064,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3076,7 +3076,7 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3092,7 +3092,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3108,7 +3108,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3127,7 +3127,7 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -3136,7 +3136,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3147,7 +3147,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3160,7 +3160,7 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -3180,7 +3180,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3197,7 +3197,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3217,7 +3217,7 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None 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 ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3227,7 +3227,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3247,8 +3247,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: record = client.dns.records.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", comment={ - "present": "string", - "absent": "string", + "present": "present", + "absent": "absent", "exact": "Hello, world", "contains": "ello, worl", "startswith": "Hello, w", @@ -3310,7 +3310,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: record = client.dns.records.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) @@ -3318,7 +3318,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3330,7 +3330,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -3345,13 +3345,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", 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.delete( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3359,7 +3359,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3371,7 +3371,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3388,7 +3388,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3404,7 +3404,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3423,7 +3423,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -3432,7 +3432,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3443,7 +3443,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3455,7 +3455,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3472,7 +3472,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3488,7 +3488,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3507,7 +3507,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -3516,7 +3516,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3527,7 +3527,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3539,12 +3539,12 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -3559,7 +3559,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3575,7 +3575,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3594,7 +3594,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3603,7 +3603,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3614,7 +3614,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3626,11 +3626,11 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -3647,7 +3647,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3663,7 +3663,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3682,7 +3682,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3691,7 +3691,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3702,7 +3702,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3714,7 +3714,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3731,7 +3731,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3747,7 +3747,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3766,7 +3766,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -3775,7 +3775,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3786,7 +3786,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3798,13 +3798,13 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -3819,7 +3819,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3835,7 +3835,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3854,7 +3854,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3863,7 +3863,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3874,7 +3874,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3886,11 +3886,11 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -3907,7 +3907,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3923,7 +3923,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3942,7 +3942,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3951,7 +3951,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3962,7 +3962,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3974,7 +3974,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -3994,7 +3994,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4010,7 +4010,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4029,7 +4029,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4038,7 +4038,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4049,7 +4049,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4061,7 +4061,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -4090,7 +4090,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4106,7 +4106,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4125,7 +4125,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4134,7 +4134,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4145,7 +4145,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4158,7 +4158,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4175,7 +4175,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4192,7 +4192,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4212,7 +4212,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -4222,7 +4222,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4234,7 +4234,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4246,15 +4246,15 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -4269,7 +4269,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4285,7 +4285,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4304,7 +4304,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4313,7 +4313,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4324,7 +4324,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4336,7 +4336,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4352,7 +4352,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4368,7 +4368,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4387,7 +4387,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -4396,7 +4396,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4407,7 +4407,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4419,7 +4419,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4435,7 +4435,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4451,7 +4451,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4470,7 +4470,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -4479,7 +4479,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4490,7 +4490,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4502,10 +4502,10 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -4523,7 +4523,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4539,7 +4539,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4558,7 +4558,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4567,7 +4567,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4578,7 +4578,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4590,7 +4590,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -4614,7 +4614,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4630,7 +4630,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4649,7 +4649,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -4658,7 +4658,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4669,7 +4669,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4681,11 +4681,11 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -4701,7 +4701,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4717,7 +4717,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4736,7 +4736,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4745,7 +4745,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4756,7 +4756,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4768,7 +4768,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -4788,7 +4788,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4804,7 +4804,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4823,7 +4823,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4832,7 +4832,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4843,7 +4843,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4855,10 +4855,10 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -4876,7 +4876,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4892,7 +4892,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4911,7 +4911,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4920,7 +4920,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4931,7 +4931,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4943,7 +4943,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4959,7 +4959,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4975,7 +4975,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4994,7 +4994,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -5003,7 +5003,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -5014,7 +5014,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5027,7 +5027,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -5047,7 +5047,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5064,7 +5064,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5084,7 +5084,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: 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 ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -5094,7 +5094,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5143,7 +5143,7 @@ def test_path_params_export(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: record = client.dns.records.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5151,7 +5151,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -5163,7 +5163,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -5178,13 +5178,13 @@ 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 `zone_id` but received ''"): client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", 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.get( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -5449,7 +5449,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -5521,7 +5521,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -5667,7 +5667,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -5739,7 +5739,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -6041,12 +6041,12 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -6255,7 +6255,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -6407,7 +6407,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -6552,7 +6552,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -6759,7 +6759,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6771,7 +6771,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6788,7 +6788,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6804,7 +6804,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6823,7 +6823,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -6832,7 +6832,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6843,7 +6843,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6855,7 +6855,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6872,7 +6872,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6888,7 +6888,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6907,7 +6907,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -6916,7 +6916,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6927,7 +6927,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -6939,12 +6939,12 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -6959,7 +6959,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -6975,7 +6975,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -6994,7 +6994,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7003,7 +7003,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7014,7 +7014,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7026,11 +7026,11 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -7047,7 +7047,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7063,7 +7063,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7082,7 +7082,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7091,7 +7091,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7102,7 +7102,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7114,7 +7114,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7131,7 +7131,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7147,7 +7147,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7166,7 +7166,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -7175,7 +7175,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7186,7 +7186,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7198,13 +7198,13 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -7219,7 +7219,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7235,7 +7235,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7254,7 +7254,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7263,7 +7263,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7274,7 +7274,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7286,11 +7286,11 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -7307,7 +7307,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7323,7 +7323,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7342,7 +7342,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7351,7 +7351,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7362,7 +7362,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7374,7 +7374,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -7394,7 +7394,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7410,7 +7410,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7429,7 +7429,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7438,7 +7438,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7449,7 +7449,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7461,7 +7461,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -7490,7 +7490,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7506,7 +7506,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7525,7 +7525,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7534,7 +7534,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7545,7 +7545,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7558,7 +7558,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7575,7 +7575,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy @parametrize async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7592,7 +7592,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7612,7 +7612,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -7622,7 +7622,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7634,7 +7634,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7646,15 +7646,15 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -7669,7 +7669,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy @parametrize async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7685,7 +7685,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7704,7 +7704,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7713,7 +7713,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7724,7 +7724,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7736,7 +7736,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7752,7 +7752,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy @parametrize async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7768,7 +7768,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7787,7 +7787,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -7796,7 +7796,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7807,7 +7807,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7819,7 +7819,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7835,7 +7835,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy @parametrize async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7851,7 +7851,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7870,7 +7870,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -7879,7 +7879,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7890,7 +7890,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7902,10 +7902,10 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -7923,7 +7923,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy @parametrize async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7939,7 +7939,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7958,7 +7958,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7967,7 +7967,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7978,7 +7978,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -7990,7 +7990,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -8014,7 +8014,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy @parametrize async def test_raw_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -8030,7 +8030,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -8049,7 +8049,7 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -8058,7 +8058,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -8069,7 +8069,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8081,11 +8081,11 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -8101,7 +8101,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy @parametrize async def test_raw_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8117,7 +8117,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8136,7 +8136,7 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8145,7 +8145,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8156,7 +8156,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8168,7 +8168,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -8188,7 +8188,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy @parametrize async def test_raw_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8204,7 +8204,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8223,7 +8223,7 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8232,7 +8232,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8243,7 +8243,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8255,10 +8255,10 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -8276,7 +8276,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy @parametrize async def test_raw_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8292,7 +8292,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8311,7 +8311,7 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8320,7 +8320,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8331,7 +8331,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8343,7 +8343,7 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8359,7 +8359,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy @parametrize async def test_raw_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8375,7 +8375,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8394,7 +8394,7 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -8403,7 +8403,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8414,7 +8414,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8427,7 +8427,7 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -8447,7 +8447,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy @parametrize async def test_raw_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8464,7 +8464,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8484,7 +8484,7 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl 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 ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8494,7 +8494,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8514,8 +8514,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) record = await async_client.dns.records.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", comment={ - "present": "string", - "absent": "string", + "present": "present", + "absent": "absent", "exact": "Hello, world", "contains": "ello, worl", "startswith": "Hello, w", @@ -8577,7 +8577,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) @@ -8585,7 +8585,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -8597,7 +8597,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -8612,13 +8612,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", 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.delete( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -8626,7 +8626,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8638,7 +8638,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8655,7 +8655,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8671,7 +8671,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8690,7 +8690,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -8699,7 +8699,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8710,7 +8710,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8722,7 +8722,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8739,7 +8739,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8755,7 +8755,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8774,7 +8774,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -8783,7 +8783,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8794,7 +8794,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8806,12 +8806,12 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -8826,7 +8826,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8842,7 +8842,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8861,7 +8861,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8870,7 +8870,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8881,7 +8881,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8893,11 +8893,11 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -8914,7 +8914,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8930,7 +8930,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8949,7 +8949,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8958,7 +8958,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8969,7 +8969,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -8981,7 +8981,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -8998,7 +8998,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -9014,7 +9014,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -9033,7 +9033,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -9042,7 +9042,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -9053,7 +9053,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9065,13 +9065,13 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -9086,7 +9086,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9102,7 +9102,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9121,7 +9121,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9130,7 +9130,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9141,7 +9141,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9153,11 +9153,11 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -9174,7 +9174,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9190,7 +9190,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9209,7 +9209,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9218,7 +9218,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9229,7 +9229,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9241,7 +9241,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -9261,7 +9261,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9277,7 +9277,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9296,7 +9296,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9305,7 +9305,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9316,7 +9316,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9328,7 +9328,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -9357,7 +9357,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9373,7 +9373,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9392,7 +9392,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9401,7 +9401,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9412,7 +9412,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9425,7 +9425,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9442,7 +9442,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9459,7 +9459,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9479,7 +9479,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -9489,7 +9489,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9501,7 +9501,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9513,15 +9513,15 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -9536,7 +9536,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9552,7 +9552,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9571,7 +9571,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9580,7 +9580,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9591,7 +9591,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9603,7 +9603,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9619,7 +9619,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9635,7 +9635,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9654,7 +9654,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -9663,7 +9663,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9674,7 +9674,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9686,7 +9686,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9702,7 +9702,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9718,7 +9718,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9737,7 +9737,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -9746,7 +9746,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9757,7 +9757,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9769,10 +9769,10 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -9790,7 +9790,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9806,7 +9806,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9825,7 +9825,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9834,7 +9834,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9845,7 +9845,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9857,7 +9857,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -9881,7 +9881,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9897,7 +9897,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9916,7 +9916,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -9925,7 +9925,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9936,7 +9936,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9948,11 +9948,11 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -9968,7 +9968,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async @parametrize async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9984,7 +9984,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10003,7 +10003,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10012,7 +10012,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10023,7 +10023,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10035,7 +10035,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -10055,7 +10055,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async @parametrize async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10071,7 +10071,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10090,7 +10090,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10099,7 +10099,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10110,7 +10110,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10122,10 +10122,10 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -10143,7 +10143,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async @parametrize async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10159,7 +10159,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10178,7 +10178,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10187,7 +10187,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10198,7 +10198,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10210,7 +10210,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10226,7 +10226,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async @parametrize async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10242,7 +10242,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10261,7 +10261,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -10270,7 +10270,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10281,7 +10281,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10294,7 +10294,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -10314,7 +10314,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async @parametrize async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10331,7 +10331,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10351,7 +10351,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou 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 ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10361,7 +10361,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) 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( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10410,7 +10410,7 @@ async def test_path_params_export(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10418,7 +10418,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -10430,7 +10430,7 @@ 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.dns.records.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -10445,13 +10445,13 @@ 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 `zone_id` but received ''"): await async_client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", 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.get( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/test_settings.py b/tests/api_resources/dns/test_settings.py index c0dd59c2aa2..4a2eee8e82f 100644 --- a/tests/api_resources/dns/test_settings.py +++ b/tests/api_resources/dns/test_settings.py @@ -21,7 +21,7 @@ class TestSettings: @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.dns.settings.edit( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -29,7 +29,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.dns.settings.edit( - account_id="string", + account_id="account_id", zone_defaults={ "foundation_dns": False, "multi_provider": False, @@ -54,7 +54,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.dns.settings.with_streaming_response.edit( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,14 +86,14 @@ 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.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -101,7 +101,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: setting = client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -109,7 +109,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -141,7 +141,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) @@ -152,7 +152,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.edit( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -160,7 +160,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.edit( - account_id="string", + account_id="account_id", zone_defaults={ "foundation_dns": False, "multi_provider": False, @@ -185,7 +185,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -197,7 +197,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.settings.with_streaming_response.edit( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,14 +217,14 @@ 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.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -232,7 +232,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -240,7 +240,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -252,7 +252,7 @@ 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.dns.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -272,5 +272,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/durable_objects/namespaces/test_objects.py b/tests/api_resources/durable_objects/namespaces/test_objects.py index 02340cc04b1..9e703603fcc 100644 --- a/tests/api_resources/durable_objects/namespaces/test_objects.py +++ b/tests/api_resources/durable_objects/namespaces/test_objects.py @@ -21,7 +21,7 @@ class TestObjects: @parametrize def test_method_list(self, client: Cloudflare) -> None: object_ = client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: object_ = client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, @@ -39,7 +39,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -51,7 +51,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.durable_objects.namespaces.objects.with_streaming_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -66,13 +66,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.durable_objects.namespaces.objects.with_raw_response.list( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -83,7 +83,7 @@ class TestAsyncObjects: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: object_ = await async_client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"]) @@ -91,7 +91,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: object_ = await async_client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, @@ -101,7 +101,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -113,7 +113,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.durable_objects.namespaces.objects.with_streaming_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -128,12 +128,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.durable_objects.namespaces.objects.with_raw_response.list( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/email_routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/rules/test_catch_alls.py index bae9a887033..3c894ee8d54 100644 --- a/tests/api_resources/email_routing/rules/test_catch_alls.py +++ b/tests/api_resources/email_routing/rules/test_catch_alls.py @@ -20,7 +20,7 @@ class TestCatchAlls: @parametrize def test_method_update(self, client: Cloudflare) -> None: catch_all = client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: catch_all = client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -65,7 +65,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.email_routing.rules.catch_alls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -78,7 +78,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.email_routing.rules.catch_alls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) as response: @@ -94,7 +94,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.catch_alls.with_raw_response.update( - "", + zone_identifier="", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -144,7 +144,7 @@ class TestAsyncCatchAlls: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: catch_all = await async_client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -153,7 +153,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: catch_all = await async_client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -189,7 +189,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.catch_alls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -202,7 +202,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.catch_alls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) as response: @@ -218,7 +218,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.catch_alls.with_raw_response.update( - "", + zone_identifier="", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) diff --git a/tests/api_resources/email_routing/test_addresses.py b/tests/api_resources/email_routing/test_addresses.py index 092f927fc8a..1f7a9438ef6 100644 --- a/tests/api_resources/email_routing/test_addresses.py +++ b/tests/api_resources/email_routing/test_addresses.py @@ -21,7 +21,7 @@ class TestAddresses: @parametrize def test_method_create(self, client: Cloudflare) -> None: address = client.email_routing.addresses.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) @@ -41,7 +41,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) as response: assert not response.is_closed @@ -56,21 +56,21 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.email_routing.addresses.with_raw_response.create( - "", + account_identifier="", email="user@example.com", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: address = client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Address], address, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: address = client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="asc", page=1, per_page=5, @@ -81,7 +81,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,13 +106,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.email_routing.addresses.with_raw_response.list( - "", + account_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: address = client.email_routing.addresses.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -120,7 +120,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -147,7 +147,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -155,14 +155,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): client.email_routing.addresses.with_raw_response.delete( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: address = client.email_routing.addresses.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -170,7 +170,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -197,7 +197,7 @@ 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_identifier` but received ''"): client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -205,7 +205,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): client.email_routing.addresses.with_raw_response.get( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ class TestAsyncAddresses: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -224,7 +224,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) @@ -236,7 +236,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) as response: assert not response.is_closed @@ -251,21 +251,21 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.create( - "", + account_identifier="", email="user@example.com", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Address], address, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="asc", page=1, per_page=5, @@ -276,7 +276,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -287,7 +287,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -301,13 +301,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.list( - "", + account_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -315,7 +315,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -327,7 +327,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -342,7 +342,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -350,14 +350,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): await async_client.email_routing.addresses.with_raw_response.delete( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -365,7 +365,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -377,7 +377,7 @@ 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.email_routing.addresses.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -392,7 +392,7 @@ 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_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -400,6 +400,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): await async_client.email_routing.addresses.with_raw_response.get( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/email_routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py index 0c130d6cce5..489ef091576 100644 --- a/tests/api_resources/email_routing/test_rules.py +++ b/tests/api_resources/email_routing/test_rules.py @@ -21,7 +21,7 @@ class TestRules: @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -71,7 +71,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -124,7 +124,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -178,7 +178,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -235,7 +235,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.create( - "", + zone_identifier="", actions=[ { "type": "forward", @@ -284,7 +284,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -335,7 +335,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -389,7 +389,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -444,7 +444,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -502,7 +502,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", actions=[ { @@ -551,7 +551,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): client.email_routing.rules.with_raw_response.update( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -601,14 +601,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, page=1, per_page=5, @@ -618,7 +618,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -629,7 +629,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -643,13 +643,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.email_routing.rules.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -657,7 +657,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -669,7 +669,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -684,20 +684,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): client.email_routing.rules.with_raw_response.delete( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.email_routing.rules.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -705,7 +705,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -717,7 +717,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -732,13 +732,13 @@ 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 `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): client.email_routing.rules.with_raw_response.get( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -749,7 +749,7 @@ class TestAsyncRules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -799,7 +799,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -852,7 +852,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -906,7 +906,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -963,7 +963,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.create( - "", + zone_identifier="", actions=[ { "type": "forward", @@ -1012,7 +1012,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1063,7 +1063,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1117,7 +1117,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1172,7 +1172,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1230,7 +1230,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", actions=[ { @@ -1279,7 +1279,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.update( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1329,14 +1329,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, page=1, per_page=5, @@ -1346,7 +1346,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -1357,7 +1357,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1371,13 +1371,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -1385,7 +1385,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1397,7 +1397,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1412,20 +1412,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.delete( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -1433,7 +1433,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1445,7 +1445,7 @@ 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.email_routing.rules.with_streaming_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1460,12 +1460,12 @@ 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 `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.get( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/event_notifications/r2/configuration/test_queues.py b/tests/api_resources/event_notifications/r2/configuration/test_queues.py index a0fd0bc166d..f2d278015d9 100644 --- a/tests/api_resources/event_notifications/r2/configuration/test_queues.py +++ b/tests/api_resources/event_notifications/r2/configuration/test_queues.py @@ -23,7 +23,7 @@ class TestQueues: @parametrize def test_method_update(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -32,7 +32,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", rules=[ @@ -58,7 +58,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -71,7 +71,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -87,21 +87,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -109,7 +109,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -147,21 +147,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -173,7 +173,7 @@ class TestAsyncQueues: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", rules=[ @@ -208,7 +208,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -221,7 +221,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -237,21 +237,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -259,7 +259,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -268,7 +268,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -281,7 +281,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -297,21 +297,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/event_notifications/r2/test_configuration.py b/tests/api_resources/event_notifications/r2/test_configuration.py index 0b4dd17ff6f..0ca03d9fc9f 100644 --- a/tests/api_resources/event_notifications/r2/test_configuration.py +++ b/tests/api_resources/event_notifications/r2/test_configuration.py @@ -20,7 +20,7 @@ class TestConfiguration: @parametrize def test_method_get(self, client: Cloudflare) -> None: configuration = client.event_notifications.r2.configuration.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.event_notifications.r2.configuration.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncConfiguration: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.event_notifications.r2.configuration.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.event_notifications.r2.configuration.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.event_notifications.r2.configuration.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/test_access_rules.py b/tests/api_resources/firewall/test_access_rules.py index cbd750fda04..1ae82d79762 100644 --- a/tests/api_resources/firewall/test_access_rules.py +++ b/tests/api_resources/firewall/test_access_rules.py @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -67,7 +67,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -91,14 +91,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncV4PagePaginationArray[object], access_rule, path=["response"]) @@ -106,7 +106,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( - account_id="string", + account_id="account_id", direction="desc", egs_pagination={ "json": { @@ -131,7 +131,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -143,7 +143,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -163,15 +163,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -179,8 +179,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -188,8 +188,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -201,8 +201,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,24 +217,24 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.firewall.access_rules.with_raw_response.delete( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -242,13 +242,13 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.edit( - {}, + identifier={}, configuration={ "target": "ip", "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -257,10 +257,10 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -272,10 +272,10 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -290,7 +290,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", account_id="", @@ -298,18 +298,18 @@ 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.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -317,8 +317,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -326,8 +326,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -339,8 +339,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -355,14 +355,14 @@ 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.firewall.access_rules.with_raw_response.get( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) @@ -375,7 +375,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -388,7 +388,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -399,7 +399,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -413,7 +413,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.firewall.access_rules.with_streaming_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -437,14 +437,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncV4PagePaginationArray[object], access_rule, path=["response"]) @@ -452,7 +452,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.list( - account_id="string", + account_id="account_id", direction="desc", egs_pagination={ "json": { @@ -477,7 +477,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -489,7 +489,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -509,15 +509,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -525,8 +525,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -534,8 +534,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -547,8 +547,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -563,24 +563,24 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.firewall.access_rules.with_raw_response.delete( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -588,13 +588,13 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.edit( - {}, + identifier={}, configuration={ "target": "ip", "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -603,10 +603,10 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -618,10 +618,10 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -636,7 +636,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", account_id="", @@ -644,18 +644,18 @@ 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.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -663,8 +663,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -672,8 +672,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -685,8 +685,8 @@ 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.firewall.access_rules.with_streaming_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -701,12 +701,12 @@ 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.firewall.access_rules.with_raw_response.get( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) diff --git a/tests/api_resources/firewall/test_lockdowns.py b/tests/api_resources/firewall/test_lockdowns.py index 45a8768e630..78477626c3e 100644 --- a/tests/api_resources/firewall/test_lockdowns.py +++ b/tests/api_resources/firewall/test_lockdowns.py @@ -26,7 +26,7 @@ class TestLockdowns: @parametrize def test_method_create(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -72,7 +72,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -82,7 +82,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -96,7 +96,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -113,14 +113,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.lockdowns.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -128,14 +128,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", created_on=parse_datetime("2014-01-01T05:20:00.12345Z"), description="endpoints", description_search="endpoints", @@ -153,7 +153,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -164,7 +164,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -178,13 +178,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) @@ -192,7 +192,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -204,7 +204,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -219,20 +219,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.lockdowns.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,13 +267,13 @@ 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 `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.lockdowns.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ class TestAsyncLockdowns: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -294,7 +294,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -307,7 +307,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -323,7 +323,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -331,7 +331,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -341,7 +341,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -355,7 +355,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -372,14 +372,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.lockdowns.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -387,14 +387,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", created_on=parse_datetime("2014-01-01T05:20:00.12345Z"), description="endpoints", description_search="endpoints", @@ -412,7 +412,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -423,7 +423,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -437,13 +437,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) @@ -451,7 +451,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -463,7 +463,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -478,20 +478,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.lockdowns.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -499,7 +499,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -511,7 +511,7 @@ 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.firewall.lockdowns.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -526,12 +526,12 @@ 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 `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.lockdowns.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py index 4864bb5a5fa..cefdccf0ace 100644 --- a/tests/api_resources/firewall/test_rules.py +++ b/tests/api_resources/firewall/test_rules.py @@ -29,7 +29,7 @@ class TestRules: def test_method_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -40,7 +40,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -80,7 +80,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -107,7 +107,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -125,14 +125,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -141,7 +141,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) @@ -150,7 +150,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b60", action="block", description="mir", @@ -165,7 +165,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -177,7 +177,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,14 +192,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -222,7 +222,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -253,7 +253,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -265,7 +265,7 @@ def test_method_edit(self, client: Cloudflare) -> None: def test_raw_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -280,7 +280,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: def test_streaming_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -298,14 +298,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.rules.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -314,7 +314,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -324,7 +324,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", query_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -335,7 +335,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -348,7 +348,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) as response: assert not response.is_closed @@ -364,14 +364,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_id` but received ''"): client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="", query_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.get( - "", + zone_identifier="", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -384,7 +384,7 @@ class TestAsyncRules: async def test_method_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -395,7 +395,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -409,7 +409,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -426,7 +426,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -435,7 +435,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -447,7 +447,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -462,7 +462,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -480,14 +480,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -496,7 +496,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) @@ -505,7 +505,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b60", action="block", description="mir", @@ -520,7 +520,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -532,7 +532,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -547,14 +547,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -564,7 +564,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -577,7 +577,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -593,13 +593,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -608,7 +608,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -620,7 +620,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -635,7 +635,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -653,14 +653,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.rules.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -669,7 +669,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -679,7 +679,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", query_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -690,7 +690,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -703,7 +703,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) as response: assert not response.is_closed @@ -719,13 +719,13 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_id` but received ''"): await async_client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="", query_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.get( - "", + zone_identifier="", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) diff --git a/tests/api_resources/firewall/test_ua_rules.py b/tests/api_resources/firewall/test_ua_rules.py index 2397df21b87..669f41a8dc8 100644 --- a/tests/api_resources/firewall/test_ua_rules.py +++ b/tests/api_resources/firewall/test_ua_rules.py @@ -28,7 +28,7 @@ class TestUARules: @parametrize def test_method_create(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -74,7 +74,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -84,7 +84,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -98,7 +98,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -115,14 +115,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.ua_rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -130,14 +130,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", description_search="abusive", page=1, @@ -149,7 +149,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -160,7 +160,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -174,13 +174,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) @@ -188,7 +188,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -200,7 +200,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -215,20 +215,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.ua_rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) @@ -236,7 +236,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -248,7 +248,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -263,13 +263,13 @@ 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 `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.ua_rules.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -281,7 +281,7 @@ class TestAsyncUARules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -290,7 +290,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -303,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -319,7 +319,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -327,7 +327,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -337,7 +337,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -351,7 +351,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -368,14 +368,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.ua_rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -383,14 +383,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", description_search="abusive", page=1, @@ -402,7 +402,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -413,7 +413,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -427,13 +427,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) @@ -441,7 +441,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -453,7 +453,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -468,20 +468,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.ua_rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) @@ -489,7 +489,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -501,7 +501,7 @@ 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.firewall.ua_rules.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -516,12 +516,12 @@ 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 `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.ua_rules.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/waf/packages/test_groups.py b/tests/api_resources/firewall/waf/packages/test_groups.py index b07aff7ed9d..ced79a7799f 100644 --- a/tests/api_resources/firewall/waf/packages/test_groups.py +++ b/tests/api_resources/firewall/waf/packages/test_groups.py @@ -25,7 +25,7 @@ class TestGroups: @parametrize def test_method_list(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Group], group, path=["response"]) @@ -33,7 +33,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", @@ -49,7 +49,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -61,7 +61,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -76,20 +76,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -98,7 +98,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -108,7 +108,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -121,7 +121,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -137,21 +137,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.edit( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -159,7 +159,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -168,7 +168,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -181,7 +181,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -197,21 +197,21 @@ 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 `zone_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.get( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -223,7 +223,7 @@ class TestAsyncGroups: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Group], group, path=["response"]) @@ -231,7 +231,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", @@ -247,7 +247,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -259,7 +259,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -274,20 +274,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -296,7 +296,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -306,7 +306,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -319,7 +319,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -335,21 +335,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.edit( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -357,7 +357,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -366,7 +366,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -379,7 +379,7 @@ 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.firewall.waf.packages.groups.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -395,21 +395,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 `zone_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.get( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py index 5936030bd50..627ebc309fb 100644 --- a/tests/api_resources/firewall/waf/packages/test_rules.py +++ b/tests/api_resources/firewall/waf/packages/test_rules.py @@ -25,7 +25,7 @@ class TestRules: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @@ -33,7 +33,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="SQL injection prevention for SELECT statements", direction="desc", @@ -43,14 +43,14 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: order="priority", page=1, per_page=5, - priority="string", + priority="priority", ) assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -62,7 +62,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -77,20 +77,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -99,7 +99,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -109,7 +109,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -122,7 +122,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -138,21 +138,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -160,7 +160,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -169,7 +169,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -182,7 +182,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -198,21 +198,21 @@ 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 `zone_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.get( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -224,7 +224,7 @@ class TestAsyncRules: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @@ -232,7 +232,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="SQL injection prevention for SELECT statements", direction="desc", @@ -242,14 +242,14 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) order="priority", page=1, per_page=5, - priority="string", + priority="priority", ) assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -261,7 +261,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -276,20 +276,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -298,7 +298,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -308,7 +308,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -321,7 +321,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -337,21 +337,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -359,7 +359,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -368,7 +368,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -381,7 +381,7 @@ 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.firewall.waf.packages.rules.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -397,21 +397,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 `zone_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.get( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) diff --git a/tests/api_resources/firewall/waf/test_overrides.py b/tests/api_resources/firewall/waf/test_overrides.py index 8a11a0e684f..aecf521b556 100644 --- a/tests/api_resources/firewall/waf/test_overrides.py +++ b/tests/api_resources/firewall/waf/test_overrides.py @@ -25,7 +25,7 @@ class TestOverrides: @parametrize def test_method_create(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Override, override, path=["response"]) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -47,7 +47,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -63,7 +63,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -81,7 +81,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -95,7 +95,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -112,14 +112,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.waf.overrides.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -127,14 +127,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Override], override, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=5, ) @@ -143,7 +143,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -154,7 +154,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -168,13 +168,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) @@ -182,7 +182,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -194,7 +194,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -209,20 +209,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.waf.overrides.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Override, override, path=["response"]) @@ -230,7 +230,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -242,7 +242,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -257,13 +257,13 @@ 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 `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.waf.overrides.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -275,7 +275,7 @@ class TestAsyncOverrides: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Override, override, path=["response"]) @@ -284,7 +284,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -297,7 +297,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -313,7 +313,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -321,7 +321,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -331,7 +331,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -345,7 +345,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -362,14 +362,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -377,14 +377,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Override], override, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=5, ) @@ -393,7 +393,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -404,7 +404,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -418,13 +418,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) @@ -432,7 +432,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -444,7 +444,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -459,20 +459,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Override, override, path=["response"]) @@ -480,7 +480,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -492,7 +492,7 @@ 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.firewall.waf.overrides.with_streaming_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -507,12 +507,12 @@ 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 `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/waf/test_packages.py b/tests/api_resources/firewall/waf/test_packages.py index 9ce8631baf8..b93a426e71f 100644 --- a/tests/api_resources/firewall/waf/test_packages.py +++ b/tests/api_resources/firewall/waf/test_packages.py @@ -22,7 +22,7 @@ class TestPackages: @parametrize def test_method_list(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) @@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", name="USER", @@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -56,7 +56,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -71,13 +71,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.packages.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PackageGetResponse, package, path=["response"]) @@ -85,7 +85,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -97,7 +97,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -112,13 +112,13 @@ 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 `zone_identifier` but received ''"): client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.firewall.waf.packages.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ class TestAsyncPackages: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) @@ -138,7 +138,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", name="USER", @@ -152,7 +152,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -164,7 +164,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -179,13 +179,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.packages.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PackageGetResponse, package, path=["response"]) @@ -193,7 +193,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -205,7 +205,7 @@ 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.firewall.waf.packages.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -220,12 +220,12 @@ 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 `zone_identifier` but received ''"): await async_client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.firewall.waf.packages.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/healthchecks/test_previews.py b/tests/api_resources/healthchecks/test_previews.py index 8e270873849..8377cb4f89d 100644 --- a/tests/api_resources/healthchecks/test_previews.py +++ b/tests/api_resources/healthchecks/test_previews.py @@ -104,7 +104,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) @@ -112,7 +112,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -124,7 +124,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.healthchecks.previews.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -139,20 +139,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.previews.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, preview, path=["response"]) @@ -160,7 +160,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -172,7 +172,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.healthchecks.previews.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -187,13 +187,13 @@ 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 `zone_id` but received ''"): client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.previews.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) @@ -293,7 +293,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -305,7 +305,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.previews.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -320,20 +320,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, preview, path=["response"]) @@ -341,7 +341,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -353,7 +353,7 @@ 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.healthchecks.previews.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -368,12 +368,12 @@ 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 `zone_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/hostnames/settings/test_tls.py b/tests/api_resources/hostnames/settings/test_tls.py index 7a3a570b024..60abcaf4022 100644 --- a/tests/api_resources/hostnames/settings/test_tls.py +++ b/tests/api_resources/hostnames/settings/test_tls.py @@ -24,7 +24,7 @@ class TestTLS: @parametrize def test_method_update(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -48,7 +48,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -65,7 +65,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.hostnames.settings.tls.with_raw_response.update( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -82,7 +82,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -91,7 +91,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -104,7 +104,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) as response: @@ -120,14 +120,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.hostnames.settings.tls.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -135,7 +135,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) @@ -143,7 +143,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -155,7 +155,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -170,7 +170,7 @@ 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 `zone_id` but received ''"): client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="", ) @@ -181,7 +181,7 @@ class TestAsyncTLS: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -191,7 +191,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -205,7 +205,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -222,7 +222,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -230,7 +230,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.update( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -239,7 +239,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -248,7 +248,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -261,7 +261,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) as response: @@ -277,14 +277,14 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -292,7 +292,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) @@ -300,7 +300,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,7 +312,7 @@ 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.hostnames.settings.tls.with_streaming_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -327,6 +327,6 @@ 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 `zone_id` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="", ) diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index b0f78ba131d..a6edc5fb868 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -120,7 +120,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -137,7 +137,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -159,7 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -180,7 +180,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -204,7 +204,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", name="example-hyperdrive", origin={ @@ -218,7 +218,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.update( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -271,7 +271,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigDeleteResponse, config, path=["response"]) @@ -279,7 +279,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -291,7 +291,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -306,13 +306,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.delete( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -320,7 +320,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -329,7 +329,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", caching={ "disabled": False, @@ -351,7 +351,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -364,7 +364,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -380,20 +380,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.edit( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -401,7 +401,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -413,7 +413,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -428,13 +428,13 @@ 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.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.get( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -541,7 +541,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -558,7 +558,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -580,7 +580,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -601,7 +601,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -625,7 +625,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", name="example-hyperdrive", origin={ @@ -639,7 +639,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.update( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -692,7 +692,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigDeleteResponse, config, path=["response"]) @@ -700,7 +700,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -712,7 +712,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -727,13 +727,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.delete( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -741,7 +741,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -750,7 +750,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", caching={ "disabled": False, @@ -772,7 +772,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -785,7 +785,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -801,20 +801,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.edit( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -822,7 +822,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -834,7 +834,7 @@ 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.hyperdrive.configs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -849,12 +849,12 @@ 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.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.get( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/iam/test_permission_groups.py b/tests/api_resources/iam/test_permission_groups.py index 298235ce84e..b1da71007ab 100644 --- a/tests/api_resources/iam/test_permission_groups.py +++ b/tests/api_resources/iam/test_permission_groups.py @@ -71,7 +71,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: permission_group = client.iam.permission_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(PermissionGroupGetResponse, permission_group, path=["response"]) @@ -79,7 +79,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -91,7 +91,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.iam.permission_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -106,13 +106,13 @@ 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.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `permission_group_id` but received ''"): client.iam.permission_groups.with_raw_response.get( - "", + permission_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -173,7 +173,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: permission_group = await async_client.iam.permission_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(PermissionGroupGetResponse, permission_group, path=["response"]) @@ -181,7 +181,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -193,7 +193,7 @@ 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.iam.permission_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -208,12 +208,12 @@ 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.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `permission_group_id` but received ''"): await async_client.iam.permission_groups.with_raw_response.get( - "", + permission_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) diff --git a/tests/api_resources/iam/test_resource_groups.py b/tests/api_resources/iam/test_resource_groups.py index a08c3160026..bd287629b9f 100644 --- a/tests/api_resources/iam/test_resource_groups.py +++ b/tests/api_resources/iam/test_resource_groups.py @@ -112,7 +112,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -128,7 +128,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -145,7 +145,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -165,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.iam.resource_groups.with_streaming_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -188,7 +188,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -202,7 +202,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): client.iam.resource_groups.with_raw_response.update( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -266,7 +266,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[ResourceGroupDeleteResponse], resource_group, path=["response"]) @@ -274,7 +274,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -286,7 +286,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.iam.resource_groups.with_streaming_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -301,20 +301,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): client.iam.resource_groups.with_raw_response.delete( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(ResourceGroupGetResponse, resource_group, path=["response"]) @@ -322,7 +322,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -334,7 +334,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.iam.resource_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -349,13 +349,13 @@ 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.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): client.iam.resource_groups.with_raw_response.get( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -452,7 +452,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -468,7 +468,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -485,7 +485,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -505,7 +505,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.iam.resource_groups.with_streaming_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -528,7 +528,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -542,7 +542,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.update( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -606,7 +606,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[ResourceGroupDeleteResponse], resource_group, path=["response"]) @@ -614,7 +614,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -626,7 +626,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.iam.resource_groups.with_streaming_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -641,20 +641,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.delete( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(ResourceGroupGetResponse, resource_group, path=["response"]) @@ -662,7 +662,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -674,7 +674,7 @@ 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.iam.resource_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -689,12 +689,12 @@ 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.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.get( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index 5662df98dcc..1114273c5e3 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -126,7 +126,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: v1 = client.images.v1.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(V1DeleteResponse, v1, path=["response"]) @@ -134,7 +134,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -146,7 +146,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -161,20 +161,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.with_raw_response.delete( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: v1 = client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -182,7 +182,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", metadata={}, require_signed_urls=True, @@ -192,7 +192,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -204,7 +204,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -219,20 +219,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.with_raw_response.edit( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: v1 = client.images.v1.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,13 +267,13 @@ 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.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -385,7 +385,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(V1DeleteResponse, v1, path=["response"]) @@ -393,7 +393,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -405,7 +405,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -420,20 +420,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.with_raw_response.delete( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -441,7 +441,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", metadata={}, require_signed_urls=True, @@ -451,7 +451,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -463,7 +463,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -478,20 +478,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.with_raw_response.edit( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -499,7 +499,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -511,7 +511,7 @@ 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.images.v1.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -526,12 +526,12 @@ 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.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/images/test_v2.py b/tests/api_resources/images/test_v2.py index 52527ae66ae..d668ca234a8 100644 --- a/tests/api_resources/images/test_v2.py +++ b/tests/api_resources/images/test_v2.py @@ -28,7 +28,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: v2 = client.images.v2.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - continuation_token="string", + continuation_token="continuation_token", per_page=10, sort_order="asc", ) @@ -80,7 +80,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: v2 = await async_client.images.v2.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - continuation_token="string", + continuation_token="continuation_token", per_page=10, sort_order="asc", ) diff --git a/tests/api_resources/images/v1/test_blobs.py b/tests/api_resources/images/v1/test_blobs.py index e9573fc5000..2d3a89dbc0b 100644 --- a/tests/api_resources/images/v1/test_blobs.py +++ b/tests/api_resources/images/v1/test_blobs.py @@ -26,11 +26,11 @@ class TestBlobs: @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = client.images.v1.blobs.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert blob.is_closed @@ -41,12 +41,12 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = client.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -58,11 +58,11 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.images.v1.blobs.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as blob: assert not blob.is_closed @@ -79,13 +79,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter 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.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.blobs.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -96,11 +96,11 @@ class TestAsyncBlobs: @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = await async_client.images.v1.blobs.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert blob.is_closed @@ -111,12 +111,12 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = await async_client.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -128,11 +128,11 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.images.v1.blobs.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as blob: assert not blob.is_closed @@ -149,12 +149,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx 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.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.blobs.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/images/v1/test_keys.py b/tests/api_resources/images/v1/test_keys.py index 570044e7b4f..ef6122e1816 100644 --- a/tests/api_resources/images/v1/test_keys.py +++ b/tests/api_resources/images/v1/test_keys.py @@ -20,7 +20,7 @@ class TestKeys: @parametrize def test_method_update(self, client: Cloudflare) -> None: key = client.images.v1.keys.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyUpdateResponse, key, path=["response"]) @@ -28,7 +28,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.images.v1.keys.with_streaming_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): client.images.v1.keys.with_raw_response.update( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -106,7 +106,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.images.v1.keys.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -114,7 +114,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -126,7 +126,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.keys.with_streaming_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -141,13 +141,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): client.images.v1.keys.with_raw_response.delete( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ class TestAsyncKeys: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.images.v1.keys.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyUpdateResponse, key, path=["response"]) @@ -166,7 +166,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -178,7 +178,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.keys.with_streaming_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): await async_client.images.v1.keys.with_raw_response.update( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -244,7 +244,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.images.v1.keys.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -252,7 +252,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -264,7 +264,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.keys.with_streaming_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -279,12 +279,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): await async_client.images.v1.keys.with_raw_response.delete( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py index d5cb41d40f0..0b88368b362 100644 --- a/tests/api_resources/images/v1/test_variants.py +++ b/tests/api_resources/images/v1/test_variants.py @@ -145,7 +145,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: variant = client.images.v1.variants.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantDeleteResponse, variant, path=["response"]) @@ -153,7 +153,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -165,7 +165,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -180,20 +180,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): client.images.v1.variants.with_raw_response.delete( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: variant = client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -207,7 +207,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: variant = client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -222,7 +222,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -240,7 +240,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -261,7 +261,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="", options={ "fit": "scale-down", @@ -273,7 +273,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): client.images.v1.variants.with_raw_response.edit( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -286,7 +286,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: variant = client.images.v1.variants.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantGetResponse, variant, path=["response"]) @@ -294,7 +294,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -306,7 +306,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -321,13 +321,13 @@ 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.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): client.images.v1.variants.with_raw_response.get( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -457,7 +457,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantDeleteResponse, variant, path=["response"]) @@ -465,7 +465,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -477,7 +477,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -492,20 +492,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): await async_client.images.v1.variants.with_raw_response.delete( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -519,7 +519,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -534,7 +534,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -552,7 +552,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -573,7 +573,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="", options={ "fit": "scale-down", @@ -585,7 +585,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): await async_client.images.v1.variants.with_raw_response.edit( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -598,7 +598,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantGetResponse, variant, path=["response"]) @@ -606,7 +606,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -618,7 +618,7 @@ 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.images.v1.variants.with_streaming_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -633,12 +633,12 @@ 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.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): await async_client.images.v1.variants.with_raw_response.get( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/intel/asn/test_subnets.py b/tests/api_resources/intel/asn/test_subnets.py index b231532262f..116eb6f482b 100644 --- a/tests/api_resources/intel/asn/test_subnets.py +++ b/tests/api_resources/intel/asn/test_subnets.py @@ -20,7 +20,7 @@ class TestSubnets: @parametrize def test_method_get(self, client: Cloudflare) -> None: subnet = client.intel.asn.subnets.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubnetGetResponse, subnet, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.asn.subnets.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ 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.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="", ) @@ -66,7 +66,7 @@ class TestAsyncSubnets: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: subnet = await async_client.intel.asn.subnets.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubnetGetResponse, subnet, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -86,7 +86,7 @@ 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.intel.asn.subnets.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -101,6 +101,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No 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.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="", ) diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py index c1e5f300928..db438e3e04a 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issues.py +++ b/tests/api_resources/intel/attack_surface_report/test_issues.py @@ -141,7 +141,7 @@ def test_path_params_class(self, client: Cloudflare) -> None: @parametrize def test_method_dismiss(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @@ -149,7 +149,7 @@ def test_method_dismiss(self, client: Cloudflare) -> None: @parametrize def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", dismiss=True, ) @@ -158,7 +158,7 @@ def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_dismiss(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -170,7 +170,7 @@ def test_raw_response_dismiss(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_dismiss(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issues.with_streaming_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -185,13 +185,13 @@ def test_streaming_response_dismiss(self, client: Cloudflare) -> None: def test_path_params_dismiss(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `issue_id` but received ''"): client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "", + issue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -428,7 +428,7 @@ async def test_path_params_class(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @@ -436,7 +436,7 @@ async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", dismiss=True, ) @@ -445,7 +445,7 @@ async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflar @parametrize async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -457,7 +457,7 @@ async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None @parametrize async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issues.with_streaming_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -472,13 +472,13 @@ async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) - async def test_path_params_dismiss(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `issue_id` but received ''"): await async_client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "", + issue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/intel/indicator_feeds/test_snapshots.py b/tests/api_resources/intel/indicator_feeds/test_snapshots.py index 0db382b0f3f..5b7f91a523b 100644 --- a/tests/api_resources/intel/indicator_feeds/test_snapshots.py +++ b/tests/api_resources/intel/indicator_feeds/test_snapshots.py @@ -21,7 +21,7 @@ class TestSnapshots: @parametrize def test_method_update(self, client: Cloudflare) -> None: snapshot = client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: snapshot = client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", source="@/Users/me/test.stix2", ) @@ -40,7 +40,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.snapshots.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -69,7 +69,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="", ) @@ -81,7 +81,7 @@ class TestAsyncSnapshots: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: snapshot = await async_client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) @@ -90,7 +90,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: snapshot = await async_client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", source="@/Users/me/test.stix2", ) @@ -100,7 +100,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -113,7 +113,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.snapshots.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -129,6 +129,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="", ) diff --git a/tests/api_resources/intel/test_asn.py b/tests/api_resources/intel/test_asn.py index 5ef9475861f..1b9016472fe 100644 --- a/tests/api_resources/intel/test_asn.py +++ b/tests/api_resources/intel/test_asn.py @@ -20,7 +20,7 @@ class TestASN: @parametrize def test_method_get(self, client: Cloudflare) -> None: asn = client.intel.asn.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ASN], asn, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.asn.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ 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.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="", ) @@ -66,7 +66,7 @@ class TestAsyncASN: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: asn = await async_client.intel.asn.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ASN], asn, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -86,7 +86,7 @@ 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.intel.asn.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -101,6 +101,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No 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.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="", ) diff --git a/tests/api_resources/intel/test_dns.py b/tests/api_resources/intel/test_dns.py index 4e95dc2891a..515012c788b 100644 --- a/tests/api_resources/intel/test_dns.py +++ b/tests/api_resources/intel/test_dns.py @@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: dns = client.intel.dns.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", + ipv4="ipv4", page=1, per_page=20, start_end_params={ @@ -86,7 +86,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: dns = await async_client.intel.dns.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", + ipv4="ipv4", page=1, per_page=20, start_end_params={ diff --git a/tests/api_resources/intel/test_domains.py b/tests/api_resources/intel/test_domains.py index 7241e5d4ad2..9a897bf7904 100644 --- a/tests/api_resources/intel/test_domains.py +++ b/tests/api_resources/intel/test_domains.py @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain = client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[Domain], domain, path=["response"]) @@ -78,7 +78,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[Domain], domain, path=["response"]) diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py index 45aee641fae..b1d65b7148f 100644 --- a/tests/api_resources/intel/test_indicator_feeds.py +++ b/tests/api_resources/intel/test_indicator_feeds.py @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) @@ -81,7 +81,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is an example description", is_attributable=True, @@ -93,7 +93,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -105,7 +105,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -120,7 +120,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="", ) @@ -165,7 +165,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_data(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, indicator_feed, path=["response"]) @@ -173,7 +173,7 @@ def test_method_data(self, client: Cloudflare) -> None: @parametrize def test_raw_response_data(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -185,7 +185,7 @@ def test_raw_response_data(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_data(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -200,14 +200,14 @@ def test_streaming_response_data(self, client: Cloudflare) -> None: def test_path_params_data(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) @@ -215,7 +215,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -227,7 +227,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -242,7 +242,7 @@ 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.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="", ) @@ -300,7 +300,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) @@ -308,7 +308,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is an example description", is_attributable=True, @@ -320,7 +320,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -332,7 +332,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -347,7 +347,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="", ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_data(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, indicator_feed, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_data(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_data(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ async def test_raw_response_data(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_data(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -427,14 +427,14 @@ async def test_streaming_response_data(self, async_client: AsyncCloudflare) -> N async def test_path_params_data(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) @@ -442,7 +442,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ 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.intel.indicator_feeds.with_streaming_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,6 +469,6 @@ 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.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="", ) diff --git a/tests/api_resources/intel/test_ips.py b/tests/api_resources/intel/test_ips.py index 56721abdf3a..4f39c996906 100644 --- a/tests/api_resources/intel/test_ips.py +++ b/tests/api_resources/intel/test_ips.py @@ -28,8 +28,8 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip = client.intel.ips.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", - ipv6="string", + ipv4="ipv4", + ipv6="ipv6", ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) @@ -79,8 +79,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.intel.ips.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", - ipv6="string", + ipv4="ipv4", + ipv6="ipv6", ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) diff --git a/tests/api_resources/intel/test_miscategorizations.py b/tests/api_resources/intel/test_miscategorizations.py index 9f3f59fae1d..a72f326fff3 100644 --- a/tests/api_resources/intel/test_miscategorizations.py +++ b/tests/api_resources/intel/test_miscategorizations.py @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ip={}, security_adds=[117, 131], security_removes=[83], - url="string", + url="url", ) assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) @@ -90,7 +90,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ip={}, security_adds=[117, 131], security_removes=[83], - url="string", + url="url", ) assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) diff --git a/tests/api_resources/intel/test_whois.py b/tests/api_resources/intel/test_whois.py index c8f0f4035df..97c8efbf7a2 100644 --- a/tests/api_resources/intel/test_whois.py +++ b/tests/api_resources/intel/test_whois.py @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: whois = client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) @@ -78,7 +78,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: whois = await async_client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) diff --git a/tests/api_resources/kv/namespaces/test_bulk.py b/tests/api_resources/kv/namespaces/test_bulk.py index 6a37a64f90e..42649742375 100644 --- a/tests/api_resources/kv/namespaces/test_bulk.py +++ b/tests/api_resources/kv/namespaces/test_bulk.py @@ -20,7 +20,7 @@ class TestBulk: @parametrize def test_method_update(self, client: Cloudflare) -> None: bulk = client.kv.namespaces.bulk.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -42,7 +42,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.bulk.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: bulk = client.kv.namespaces.bulk.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkDeleteResponse], bulk, path=["response"]) @@ -81,7 +81,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.bulk.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncBulk: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.kv.namespaces.bulk.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -134,7 +134,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.bulk.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -178,7 +178,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.kv.namespaces.bulk.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkDeleteResponse], bulk, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.bulk.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/kv/namespaces/test_keys.py b/tests/api_resources/kv/namespaces/test_keys.py index 26c09a1f9b5..074a872cc1d 100644 --- a/tests/api_resources/kv/namespaces/test_keys.py +++ b/tests/api_resources/kv/namespaces/test_keys.py @@ -21,7 +21,7 @@ class TestKeys: @parametrize def test_method_list(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncCursorLimitPagination[Key], key, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw", limit=10, @@ -40,7 +40,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.kv.namespaces.keys.with_streaming_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,13 +67,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.keys.with_raw_response.list( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -84,7 +84,7 @@ class TestAsyncKeys: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncCursorLimitPagination[Key], key, path=["response"]) @@ -92,7 +92,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw", limit=10, @@ -103,7 +103,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -115,7 +115,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.keys.with_streaming_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -130,12 +130,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.keys.with_raw_response.list( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/kv/namespaces/test_metadata.py b/tests/api_resources/kv/namespaces/test_metadata.py index 7c8a4325a43..e6e56f6f06a 100644 --- a/tests/api_resources/kv/namespaces/test_metadata.py +++ b/tests/api_resources/kv/namespaces/test_metadata.py @@ -20,7 +20,7 @@ class TestMetadata: @parametrize def test_method_get(self, client: Cloudflare) -> None: metadata = client.kv.namespaces.metadata.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.kv.namespaces.metadata.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -58,21 +58,21 @@ 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.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.metadata.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -84,7 +84,7 @@ class TestAsyncMetadata: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: metadata = await async_client.kv.namespaces.metadata.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -106,7 +106,7 @@ 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.kv.namespaces.metadata.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -122,21 +122,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.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.metadata.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) diff --git a/tests/api_resources/kv/namespaces/test_values.py b/tests/api_resources/kv/namespaces/test_values.py index 36b3d06967a..376ec1960ef 100644 --- a/tests/api_resources/kv/namespaces/test_values.py +++ b/tests/api_resources/kv/namespaces/test_values.py @@ -29,7 +29,7 @@ class TestValues: @parametrize def test_method_update(self, client: Cloudflare) -> None: value = client.kv.namespaces.values.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -41,7 +41,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -57,7 +57,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.values.with_streaming_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -76,7 +76,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -85,7 +85,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -94,7 +94,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.values.with_raw_response.update( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -104,7 +104,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: value = client.kv.namespaces.values.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -113,7 +113,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -126,7 +126,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.values.with_streaming_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -142,21 +142,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.values.with_raw_response.delete( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -169,7 +169,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = client.kv.namespaces.values.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -205,7 +205,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.kv.namespaces.values.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as value: @@ -224,21 +224,21 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter 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.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.values.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -251,7 +251,7 @@ class TestAsyncValues: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: value = await async_client.kv.namespaces.values.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -263,7 +263,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -279,7 +279,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.values.with_streaming_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -298,7 +298,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -307,7 +307,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -316,7 +316,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.values.with_raw_response.update( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -326,7 +326,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: value = await async_client.kv.namespaces.values.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -335,7 +335,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -348,7 +348,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.values.with_streaming_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -364,21 +364,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.values.with_raw_response.delete( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -391,7 +391,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = await async_client.kv.namespaces.values.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -409,7 +409,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = await async_client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -427,7 +427,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.kv.namespaces.values.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as value: @@ -446,21 +446,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx 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.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.values.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py index c8be55ff1e2..aa2e9589dfe 100644 --- a/tests/api_resources/kv/test_namespaces.py +++ b/tests/api_resources/kv/test_namespaces.py @@ -67,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) as response: @@ -105,14 +105,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", title="My Own Namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -169,7 +169,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceDeleteResponse], namespace, path=["response"]) @@ -177,7 +177,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -204,20 +204,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Namespace], namespace, path=["response"]) @@ -225,7 +225,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -237,7 +237,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -252,13 +252,13 @@ 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.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.get( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -311,7 +311,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -320,7 +320,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -333,7 +333,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) as response: @@ -349,14 +349,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", title="My Own Namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -413,7 +413,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceDeleteResponse], namespace, path=["response"]) @@ -421,7 +421,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -433,7 +433,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -448,20 +448,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Namespace], namespace, path=["response"]) @@ -469,7 +469,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -481,7 +481,7 @@ 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.kv.namespaces.with_streaming_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -496,12 +496,12 @@ 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.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.get( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/monitors/test_previews.py b/tests/api_resources/load_balancers/monitors/test_previews.py index 71a61ec7d40..88087f7cac9 100644 --- a/tests/api_resources/load_balancers/monitors/test_previews.py +++ b/tests/api_resources/load_balancers/monitors/test_previews.py @@ -20,7 +20,7 @@ class TestPreviews: @parametrize def test_method_create(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -69,7 +69,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.monitors.previews.with_streaming_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -85,14 +85,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.previews.with_raw_response.create( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -104,7 +104,7 @@ class TestAsyncPreviews: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -113,7 +113,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -140,7 +140,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -153,7 +153,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.previews.with_streaming_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -169,14 +169,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.previews.with_raw_response.create( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) diff --git a/tests/api_resources/load_balancers/monitors/test_references.py b/tests/api_resources/load_balancers/monitors/test_references.py index a31063f687e..58c8dcd21b2 100644 --- a/tests/api_resources/load_balancers/monitors/test_references.py +++ b/tests/api_resources/load_balancers/monitors/test_references.py @@ -20,7 +20,7 @@ class TestReferences: @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.load_balancers.monitors.references.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.monitors.references.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.references.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncReferences: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.load_balancers.monitors.references.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.load_balancers.monitors.references.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.references.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/pools/test_health.py b/tests/api_resources/load_balancers/pools/test_health.py index 6c9b62dcdea..eba8b0346db 100644 --- a/tests/api_resources/load_balancers/pools/test_health.py +++ b/tests/api_resources/load_balancers/pools/test_health.py @@ -20,7 +20,7 @@ class TestHealth: @parametrize def test_method_create(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -69,7 +69,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.pools.health.with_streaming_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -85,14 +85,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.health.with_raw_response.create( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -100,7 +100,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthGetResponse, health, path=["response"]) @@ -108,7 +108,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -120,7 +120,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.health.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -135,13 +135,13 @@ 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.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.health.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -152,7 +152,7 @@ class TestAsyncHealth: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -161,7 +161,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -188,7 +188,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -201,7 +201,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.health.with_streaming_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -217,14 +217,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.health.with_raw_response.create( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -232,7 +232,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthGetResponse, health, path=["response"]) @@ -240,7 +240,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ 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.load_balancers.pools.health.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,12 +267,12 @@ 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.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.health.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/pools/test_references.py b/tests/api_resources/load_balancers/pools/test_references.py index 409be7228ac..cde06313f61 100644 --- a/tests/api_resources/load_balancers/pools/test_references.py +++ b/tests/api_resources/load_balancers/pools/test_references.py @@ -20,7 +20,7 @@ class TestReferences: @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.load_balancers.pools.references.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.references.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.references.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncReferences: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.load_balancers.pools.references.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.load_balancers.pools.references.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.references.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py index aec60b132cd..051a99da886 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -92,7 +92,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -101,7 +101,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -128,7 +128,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -141,7 +141,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -157,14 +157,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.update( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -210,7 +210,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) @@ -218,7 +218,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -230,7 +230,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -245,20 +245,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.delete( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -267,7 +267,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -294,7 +294,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -307,7 +307,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -323,14 +323,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.edit( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -338,7 +338,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -346,7 +346,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -358,7 +358,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -373,13 +373,13 @@ 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.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -458,7 +458,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -467,7 +467,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -494,7 +494,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -507,7 +507,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -523,14 +523,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.update( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -576,7 +576,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) @@ -584,7 +584,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -596,7 +596,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -611,20 +611,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.delete( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -633,7 +633,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -660,7 +660,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -673,7 +673,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -689,14 +689,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.edit( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -704,7 +704,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -712,7 +712,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -724,7 +724,7 @@ 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.load_balancers.monitors.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -739,12 +739,12 @@ 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.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_pools.py b/tests/api_resources/load_balancers/test_pools.py index e128a3f2287..7d82191846e 100644 --- a/tests/api_resources/load_balancers/test_pools.py +++ b/tests/api_resources/load_balancers/test_pools.py @@ -128,7 +128,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -138,7 +138,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[ @@ -198,7 +198,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -212,7 +212,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -229,7 +229,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", name="primary-dc-1", origins=[{}, {}, {}], @@ -237,7 +237,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.update( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -292,7 +292,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PoolDeleteResponse, pool, path=["response"]) @@ -300,7 +300,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,7 +312,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -327,20 +327,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.delete( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -348,7 +348,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", check_regions=["WEU", "ENAM"], description="Primary data center - Provider XYZ", @@ -408,7 +408,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -420,7 +420,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -435,20 +435,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.edit( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -456,7 +456,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -468,7 +468,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -483,13 +483,13 @@ 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.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -604,7 +604,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -614,7 +614,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[ @@ -674,7 +674,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -688,7 +688,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -705,7 +705,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", name="primary-dc-1", origins=[{}, {}, {}], @@ -713,7 +713,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.update( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -768,7 +768,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PoolDeleteResponse, pool, path=["response"]) @@ -776,7 +776,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -788,7 +788,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -803,20 +803,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.delete( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -824,7 +824,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", check_regions=["WEU", "ENAM"], description="Primary data center - Provider XYZ", @@ -884,7 +884,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -896,7 +896,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -911,20 +911,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.edit( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -932,7 +932,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -944,7 +944,7 @@ 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.load_balancers.pools.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -959,12 +959,12 @@ 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.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_previews.py b/tests/api_resources/load_balancers/test_previews.py index 62da37e0c52..281f21e0600 100644 --- a/tests/api_resources/load_balancers/test_previews.py +++ b/tests/api_resources/load_balancers/test_previews.py @@ -20,7 +20,7 @@ class TestPreviews: @parametrize def test_method_get(self, client: Cloudflare) -> None: preview = client.load_balancers.previews.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewGetResponse, preview, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.previews.with_streaming_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `preview_id` but received ''"): client.load_balancers.previews.with_raw_response.get( - "", + preview_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncPreviews: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.previews.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewGetResponse, preview, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.load_balancers.previews.with_streaming_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `preview_id` but received ''"): await async_client.load_balancers.previews.with_raw_response.get( - "", + preview_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_regions.py b/tests/api_resources/load_balancers/test_regions.py index 34d882330a0..6e689dc253b 100644 --- a/tests/api_resources/load_balancers/test_regions.py +++ b/tests/api_resources/load_balancers/test_regions.py @@ -68,7 +68,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: region = client.load_balancers.regions.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionGetResponse, region, path=["response"]) @@ -76,7 +76,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -88,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.regions.with_streaming_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -103,7 +103,7 @@ 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.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="", ) @@ -162,7 +162,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: region = await async_client.load_balancers.regions.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionGetResponse, region, path=["response"]) @@ -170,7 +170,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ 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.load_balancers.regions.with_streaming_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -197,6 +197,6 @@ 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.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="", ) diff --git a/tests/api_resources/logpush/datasets/test_fields.py b/tests/api_resources/logpush/datasets/test_fields.py index fb994642e7b..b62d8b5a19f 100644 --- a/tests/api_resources/logpush/datasets/test_fields.py +++ b/tests/api_resources/logpush/datasets/test_fields.py @@ -20,8 +20,8 @@ class TestFields: @parametrize def test_method_get(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -29,8 +29,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -38,8 +38,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -51,8 +51,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.fields.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,20 +67,20 @@ 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 `dataset_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) @@ -91,8 +91,8 @@ class TestAsyncFields: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: field = await async_client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -100,8 +100,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: field = await async_client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -109,8 +109,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -122,8 +122,8 @@ 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.logpush.datasets.fields.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -138,18 +138,18 @@ 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 `dataset_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py index 7176ea97c6f..7d87be256af 100644 --- a/tests/api_resources/logpush/datasets/test_jobs.py +++ b/tests/api_resources/logpush/datasets/test_jobs.py @@ -21,8 +21,8 @@ class TestJobs: @parametrize def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -30,8 +30,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -39,8 +39,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -52,8 +52,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.jobs.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,20 +68,20 @@ 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 `dataset_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) @@ -92,8 +92,8 @@ class TestAsyncJobs: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -101,8 +101,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -110,8 +110,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -123,8 +123,8 @@ 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.logpush.datasets.jobs.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,18 +139,18 @@ 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 `dataset_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index 05950cab7b9..3a730eb3e3c 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -23,7 +23,7 @@ class TestJobs: def test_method_create(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", dataset="http_requests", enabled=False, frequency="high", @@ -44,15 +44,15 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="example.com", output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -65,7 +65,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -78,7 +78,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -100,15 +100,15 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -116,8 +116,8 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", @@ -128,15 +128,15 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: max_upload_records=1000, output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -148,8 +148,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -161,8 +161,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -177,21 +177,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.logpush.jobs.with_raw_response.update( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -199,7 +199,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -207,7 +207,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -219,7 +219,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -239,15 +239,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -255,8 +255,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -264,8 +264,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -277,8 +277,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -293,22 +293,22 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.logpush.jobs.with_raw_response.delete( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -316,8 +316,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -325,8 +325,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -338,8 +338,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -354,14 +354,14 @@ 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.logpush.jobs.with_raw_response.get( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @@ -373,7 +373,7 @@ class TestAsyncJobs: async def test_method_create(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -382,7 +382,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", dataset="http_requests", enabled=False, frequency="high", @@ -394,15 +394,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="example.com", output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -415,7 +415,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -428,7 +428,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -450,15 +450,15 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -466,8 +466,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", @@ -478,15 +478,15 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare max_upload_records=1000, output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -498,8 +498,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -511,8 +511,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -527,21 +527,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.logpush.jobs.with_raw_response.update( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -549,7 +549,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -557,7 +557,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -569,7 +569,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -589,15 +589,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -605,8 +605,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -614,8 +614,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -627,8 +627,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -643,22 +643,22 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.logpush.jobs.with_raw_response.delete( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -666,8 +666,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -675,8 +675,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -688,8 +688,8 @@ 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.logpush.jobs.with_streaming_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -704,12 +704,12 @@ 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.logpush.jobs.with_raw_response.get( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) diff --git a/tests/api_resources/logpush/test_ownership.py b/tests/api_resources/logpush/test_ownership.py index ce1f9a83fb3..c2d9297623c 100644 --- a/tests/api_resources/logpush/test_ownership.py +++ b/tests/api_resources/logpush/test_ownership.py @@ -25,7 +25,7 @@ class TestOwnership: def test_method_create(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -43,7 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logpush.ownership.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,7 +78,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -87,7 +87,7 @@ def test_method_validate(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -97,7 +97,7 @@ def test_method_validate_with_all_params(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -107,7 +107,7 @@ def test_raw_response_validate(self, client: Cloudflare) -> None: response = client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_streaming_response_validate(self, client: Cloudflare) -> None: with client.logpush.ownership.with_streaming_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,7 +145,7 @@ def test_path_params_validate(self, client: Cloudflare) -> None: client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) @@ -157,7 +157,7 @@ class TestAsyncOwnership: async def test_method_create(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -166,7 +166,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -175,7 +175,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -188,7 +188,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.ownership.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -210,7 +210,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -219,7 +219,7 @@ async def test_method_validate(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -229,7 +229,7 @@ async def test_method_validate_with_all_params(self, async_client: AsyncCloudfla ownership = await async_client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -239,7 +239,7 @@ async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> Non response = await async_client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -253,7 +253,7 @@ async def test_streaming_response_validate(self, async_client: AsyncCloudflare) async with async_client.logpush.ownership.with_streaming_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -277,5 +277,5 @@ async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None await async_client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/logpush/test_validate.py b/tests/api_resources/logpush/test_validate.py index 7b80c557e5d..fd2a12df619 100644 --- a/tests/api_resources/logpush/test_validate.py +++ b/tests/api_resources/logpush/test_validate.py @@ -25,7 +25,7 @@ class TestValidate: def test_method_destination(self, client: Cloudflare) -> None: validate = client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -34,7 +34,7 @@ def test_method_destination(self, client: Cloudflare) -> None: def test_method_destination_with_all_params(self, client: Cloudflare) -> None: validate = client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -43,7 +43,7 @@ def test_method_destination_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_destination(self, client: Cloudflare) -> None: response = client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -56,7 +56,7 @@ def test_raw_response_destination(self, client: Cloudflare) -> None: def test_streaming_response_destination(self, client: Cloudflare) -> None: with client.logpush.validate.with_streaming_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,7 +78,7 @@ def test_path_params_destination(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -86,7 +86,7 @@ def test_path_params_destination(self, client: Cloudflare) -> None: def test_method_origin(self, client: Cloudflare) -> None: validate = client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -95,7 +95,7 @@ def test_method_origin(self, client: Cloudflare) -> None: def test_method_origin_with_all_params(self, client: Cloudflare) -> None: validate = client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -104,7 +104,7 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_origin(self, client: Cloudflare) -> None: response = client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -117,7 +117,7 @@ def test_raw_response_origin(self, client: Cloudflare) -> None: def test_streaming_response_origin(self, client: Cloudflare) -> None: with client.logpush.validate.with_streaming_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +139,7 @@ def test_path_params_origin(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) @@ -151,7 +151,7 @@ class TestAsyncValidate: async def test_method_destination(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -160,7 +160,7 @@ async def test_method_destination(self, async_client: AsyncCloudflare) -> None: async def test_method_destination_with_all_params(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -169,7 +169,7 @@ async def test_method_destination_with_all_params(self, async_client: AsyncCloud async def test_raw_response_destination(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -182,7 +182,7 @@ async def test_raw_response_destination(self, async_client: AsyncCloudflare) -> async def test_streaming_response_destination(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.validate.with_streaming_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,7 +204,7 @@ async def test_path_params_destination(self, async_client: AsyncCloudflare) -> N with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -212,7 +212,7 @@ async def test_path_params_destination(self, async_client: AsyncCloudflare) -> N async def test_method_origin(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -221,7 +221,7 @@ async def test_method_origin(self, async_client: AsyncCloudflare) -> None: async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -230,7 +230,7 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -243,7 +243,7 @@ async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.validate.with_streaming_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -265,5 +265,5 @@ async def test_path_params_origin(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/logs/control/test_retention.py b/tests/api_resources/logs/control/test_retention.py index b3ae8454210..c88567517cb 100644 --- a/tests/api_resources/logs/control/test_retention.py +++ b/tests/api_resources/logs/control/test_retention.py @@ -20,7 +20,7 @@ class TestRetention: @parametrize def test_method_create(self, client: Cloudflare) -> None: retention = client.logs.control.retention.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) assert_matches_type(RetentionCreateResponse, retention, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logs.control.retention.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) @@ -40,7 +40,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logs.control.retention.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.logs.control.retention.with_raw_response.create( - "", + zone_identifier="", flag=True, ) @@ -104,7 +104,7 @@ class TestAsyncRetention: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: retention = await async_client.logs.control.retention.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) assert_matches_type(RetentionCreateResponse, retention, path=["response"]) @@ -112,7 +112,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.control.retention.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) @@ -124,7 +124,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.control.retention.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) as response: assert not response.is_closed @@ -139,7 +139,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.logs.control.retention.with_raw_response.create( - "", + zone_identifier="", flag=True, ) diff --git a/tests/api_resources/logs/test_rayid.py b/tests/api_resources/logs/test_rayid.py index 5268b84e977..6a18a0ba0dd 100644 --- a/tests/api_resources/logs/test_rayid.py +++ b/tests/api_resources/logs/test_rayid.py @@ -20,7 +20,7 @@ class TestRayID: @parametrize def test_method_get(self, client: Cloudflare) -> None: rayid = client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: rayid = client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", fields="ClientIP,RayID,EdgeStartTimestamp", timestamps="unixnano", @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -50,7 +50,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.rayid.with_streaming_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -65,13 +65,13 @@ 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 `zone_identifier` but received ''"): client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ray_identifier` but received ''"): client.logs.rayid.with_raw_response.get( - "", + ray_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -82,7 +82,7 @@ class TestAsyncRayID: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rayid = await async_client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) @@ -90,7 +90,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: rayid = await async_client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", fields="ClientIP,RayID,EdgeStartTimestamp", timestamps="unixnano", @@ -100,7 +100,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ 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.logs.rayid.with_streaming_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,12 +127,12 @@ 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 `zone_identifier` but received ''"): await async_client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ray_identifier` but received ''"): await async_client.logs.rayid.with_raw_response.get( - "", + ray_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/logs/test_received.py b/tests/api_resources/logs/test_received.py index 86effb42fe4..5f3746d0335 100644 --- a/tests/api_resources/logs/test_received.py +++ b/tests/api_resources/logs/test_received.py @@ -20,7 +20,7 @@ class TestReceived: @parametrize def test_method_get(self, client: Cloudflare) -> None: received = client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: received = client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", count=1, fields="ClientIP,RayID,EdgeStartTimestamp", @@ -41,7 +41,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.received.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) @@ -53,7 +53,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.received.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) as response: assert not response.is_closed @@ -68,7 +68,7 @@ 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 `zone_identifier` but received ''"): client.logs.received.with_raw_response.get( - "", + zone_identifier="", end="2018-05-20T10:01:00Z", ) @@ -79,7 +79,7 @@ class TestAsyncReceived: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: received = await async_client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) @@ -87,7 +87,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: received = await async_client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", count=1, fields="ClientIP,RayID,EdgeStartTimestamp", @@ -100,7 +100,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.received.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) @@ -112,7 +112,7 @@ 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.logs.received.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) as response: assert not response.is_closed @@ -127,6 +127,6 @@ 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 `zone_identifier` but received ''"): await async_client.logs.received.with_raw_response.get( - "", + zone_identifier="", end="2018-05-20T10:01:00Z", ) diff --git a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py index 6f0e476a67e..46761c021c6 100644 --- a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py +++ b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py @@ -20,7 +20,7 @@ class TestAdvertisements: @parametrize def test_method_edit(self, client: Cloudflare) -> None: advertisement = client.magic_network_monitoring.rules.advertisements.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -29,7 +29,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.advertisements.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -77,7 +77,7 @@ class TestAsyncAdvertisements: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: advertisement = await async_client.magic_network_monitoring.rules.advertisements.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -86,7 +86,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -99,7 +99,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.advertisements.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -115,14 +115,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py index b813da89aca..d2b2bce970e 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -145,7 +145,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -153,7 +153,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -165,7 +165,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -180,20 +180,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.delete( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -202,7 +202,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -215,7 +215,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -231,14 +231,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -246,7 +246,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -254,7 +254,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -266,7 +266,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -281,13 +281,13 @@ 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.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.get( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -420,7 +420,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -428,7 +428,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -440,7 +440,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -455,20 +455,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.delete( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -477,7 +477,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -490,7 +490,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -506,14 +506,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -521,7 +521,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -529,7 +529,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -541,7 +541,7 @@ 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.magic_network_monitoring.rules.with_streaming_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -556,12 +556,12 @@ 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.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.get( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py index 9cac4c6dee6..bf74fe77628 100644 --- a/tests/api_resources/magic_transit/sites/test_acls.py +++ b/tests/api_resources/magic_transit/sites/test_acls.py @@ -23,10 +23,10 @@ class TestACLs: @parametrize def test_method_create(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) assert_matches_type(ACL, acl, path=["response"]) @@ -34,17 +34,17 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "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", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -58,10 +58,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) @@ -73,10 +73,10 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) as response: assert not response.is_closed @@ -91,26 +91,26 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -119,20 +119,20 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="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", + "lan_id": "lan_id", + "lan_name": "lan_name", "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", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -144,7 +144,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -157,7 +157,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -173,21 +173,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -195,7 +195,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[ACL], acl, path=["response"]) @@ -203,7 +203,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -215,7 +215,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -230,20 +230,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -265,7 +265,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -281,21 +281,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -303,7 +303,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,20 +312,20 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="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", + "lan_id": "lan_id", + "lan_name": "lan_name", "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", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -337,7 +337,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -350,7 +350,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -366,21 +366,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -388,7 +388,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -397,7 +397,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -410,7 +410,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -426,21 +426,21 @@ 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.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -452,10 +452,10 @@ class TestAsyncACLs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) assert_matches_type(ACL, acl, path=["response"]) @@ -463,17 +463,17 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "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", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -487,10 +487,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) @@ -502,10 +502,10 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) as response: assert not response.is_closed @@ -520,26 +520,26 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) 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.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, 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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -548,20 +548,20 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="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", + "lan_id": "lan_id", + "lan_name": "lan_name", "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", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -573,7 +573,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -586,7 +586,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -602,21 +602,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -624,7 +624,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[ACL], acl, path=["response"]) @@ -632,7 +632,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -644,7 +644,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -659,20 +659,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) 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.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -681,7 +681,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -694,7 +694,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -710,21 +710,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -732,7 +732,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -741,20 +741,20 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="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", + "lan_id": "lan_id", + "lan_name": "lan_name", "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", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -766,7 +766,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -779,7 +779,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -795,21 +795,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -817,7 +817,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -826,7 +826,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @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", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -839,7 +839,7 @@ 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.magic_transit.sites.acls.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -855,21 +855,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.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="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", + acl_id="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( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/sites/test_lans.py b/tests/api_resources/magic_transit/sites/test_lans.py index 73aee303592..9d0be9dce40 100644 --- a/tests/api_resources/magic_transit/sites/test_lans.py +++ b/tests/api_resources/magic_transit/sites/test_lans.py @@ -24,7 +24,7 @@ class TestLANs: @parametrize def test_method_create(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -34,12 +34,12 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, ha_link=True, - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, routed_subnets=[ { @@ -79,7 +79,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -93,7 +93,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -110,7 +110,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -118,7 +118,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -127,7 +127,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,10 +136,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -181,7 +181,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -194,7 +194,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -210,21 +210,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.update( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -232,7 +232,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[LAN], lan, path=["response"]) @@ -240,7 +240,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,20 +267,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -289,7 +289,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -302,7 +302,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -318,21 +318,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.delete( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -340,7 +340,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,10 +349,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -394,7 +394,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -407,7 +407,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -423,21 +423,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.edit( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -445,7 +445,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -467,7 +467,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -483,21 +483,21 @@ 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.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.get( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -509,7 +509,7 @@ class TestAsyncLANs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -519,12 +519,12 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, ha_link=True, - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, routed_subnets=[ { @@ -564,7 +564,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -578,7 +578,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -595,7 +595,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -603,7 +603,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -612,7 +612,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -621,10 +621,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -666,7 +666,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -679,7 +679,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -695,21 +695,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.update( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -717,7 +717,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[LAN], lan, path=["response"]) @@ -725,7 +725,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -737,7 +737,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -752,20 +752,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -774,7 +774,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -787,7 +787,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -803,21 +803,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.delete( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -825,7 +825,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -834,10 +834,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -879,7 +879,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -892,7 +892,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -908,21 +908,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.edit( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -930,7 +930,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -939,7 +939,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -952,7 +952,7 @@ 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.magic_transit.sites.lans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -968,21 +968,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.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="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.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.get( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/sites/test_wans.py b/tests/api_resources/magic_transit/sites/test_wans.py index d8fa728ed91..c3ba81f3615 100644 --- a/tests/api_resources/magic_transit/sites/test_wans.py +++ b/tests/api_resources/magic_transit/sites/test_wans.py @@ -24,7 +24,7 @@ class TestWANs: @parametrize def test_method_create(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -34,11 +34,11 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, - name="string", + name="name", priority=0, static_addressing={ "address": "192.0.2.0/24", @@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -65,7 +65,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -82,7 +82,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -90,7 +90,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -99,7 +99,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -108,10 +108,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -126,7 +126,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -155,21 +155,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.update( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -177,7 +177,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[WAN], wan, path=["response"]) @@ -185,7 +185,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -197,7 +197,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -212,20 +212,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -234,7 +234,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -247,7 +247,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -263,21 +263,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.delete( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -294,10 +294,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -312,7 +312,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -325,7 +325,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -341,21 +341,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.edit( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -363,7 +363,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -372,7 +372,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -385,7 +385,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -401,21 +401,21 @@ 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.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.get( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -427,7 +427,7 @@ class TestAsyncWANs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -437,11 +437,11 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, - name="string", + name="name", priority=0, static_addressing={ "address": "192.0.2.0/24", @@ -454,7 +454,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -468,7 +468,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -485,7 +485,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -493,7 +493,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -502,7 +502,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -511,10 +511,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -529,7 +529,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -542,7 +542,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -558,21 +558,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.update( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -580,7 +580,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[WAN], wan, path=["response"]) @@ -588,7 +588,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -600,7 +600,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -615,20 +615,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -637,7 +637,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -650,7 +650,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -666,21 +666,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.delete( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -688,7 +688,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -697,10 +697,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -715,7 +715,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -728,7 +728,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -744,21 +744,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.edit( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -766,7 +766,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -775,7 +775,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -788,7 +788,7 @@ 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.magic_transit.sites.wans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -804,21 +804,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.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="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.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.get( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_apps.py b/tests/api_resources/magic_transit/test_apps.py index 1cd6c73830d..7a2bea638d1 100644 --- a/tests/api_resources/magic_transit/test_apps.py +++ b/tests/api_resources/magic_transit/test_apps.py @@ -137,7 +137,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -149,7 +149,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -165,7 +165,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -184,14 +184,14 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -202,7 +202,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -214,7 +214,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -230,7 +230,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -249,14 +249,14 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -267,7 +267,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -279,7 +279,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -295,7 +295,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -314,14 +314,14 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -332,7 +332,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -344,7 +344,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -360,7 +360,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -379,14 +379,14 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -444,7 +444,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: app = client.magic_transit.apps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -452,7 +452,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -464,7 +464,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -479,13 +479,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.delete( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -607,7 +607,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -619,7 +619,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -635,7 +635,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -654,14 +654,14 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -672,7 +672,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -684,7 +684,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -700,7 +700,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -719,14 +719,14 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -737,7 +737,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -749,7 +749,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -765,7 +765,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -784,14 +784,14 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -802,7 +802,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -814,7 +814,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -830,7 +830,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -849,14 +849,14 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -914,7 +914,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -922,7 +922,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -934,7 +934,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -949,12 +949,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.delete( - "", + account_app_id="", account_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 efb8610882b..203c0a018a1 100644 --- a/tests/api_resources/magic_transit/test_cf_interconnects.py +++ b/tests/api_resources/magic_transit/test_cf_interconnects.py @@ -24,7 +24,7 @@ class TestCfInterconnects: @parametrize def test_method_update(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) @@ -32,7 +32,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Tunnel for Interconnect to ORD", gre={"cloudflare_endpoint": "203.0.113.1"}, @@ -50,7 +50,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -62,7 +62,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.cf_interconnects.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -77,13 +77,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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", + cf_interconnect_id="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( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -128,7 +128,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) @@ -136,7 +136,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -148,7 +148,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.cf_interconnects.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -163,13 +163,13 @@ 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.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="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( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -180,7 +180,7 @@ class TestAsyncCfInterconnects: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) @@ -188,7 +188,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @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", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Tunnel for Interconnect to ORD", gre={"cloudflare_endpoint": "203.0.113.1"}, @@ -206,7 +206,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @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", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -218,7 +218,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @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", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -233,13 +233,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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", + cf_interconnect_id="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( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) @@ -292,7 +292,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @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", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -304,7 +304,7 @@ 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.magic_transit.cf_interconnects.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -319,12 +319,12 @@ 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.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="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( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_connectors.py b/tests/api_resources/magic_transit/test_connectors.py index b2e77874a82..75506734f5e 100644 --- a/tests/api_resources/magic_transit/test_connectors.py +++ b/tests/api_resources/magic_transit/test_connectors.py @@ -26,7 +26,7 @@ class TestConnectors: @parametrize def test_method_update(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @@ -34,20 +34,20 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -59,7 +59,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.connectors.with_streaming_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -74,13 +74,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.magic_transit.connectors.with_raw_response.update( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @@ -133,20 +133,20 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.connectors.with_streaming_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -173,20 +173,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.magic_transit.connectors.with_raw_response.edit( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorGetResponse, connector, path=["response"]) @@ -194,7 +194,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -206,7 +206,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.connectors.with_streaming_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -221,13 +221,13 @@ 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.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.magic_transit.connectors.with_raw_response.get( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ class TestAsyncConnectors: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @@ -246,20 +246,20 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -271,7 +271,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.connectors.with_streaming_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -286,13 +286,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.update( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -337,7 +337,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @@ -345,20 +345,20 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -370,7 +370,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.connectors.with_streaming_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -385,20 +385,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.edit( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorGetResponse, connector, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -418,7 +418,7 @@ 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.magic_transit.connectors.with_streaming_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -433,12 +433,12 @@ 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.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.get( - "", + connector_id="", 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 512d2d01880..a444b45f529 100644 --- a/tests/api_resources/magic_transit/test_gre_tunnels.py +++ b/tests/api_resources/magic_transit/test_gre_tunnels.py @@ -72,7 +72,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -84,7 +84,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -106,7 +106,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -122,7 +122,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -141,7 +141,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -151,7 +151,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.update( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -200,7 +200,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) @@ -208,7 +208,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -220,7 +220,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -235,20 +235,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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", + gre_tunnel_id="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( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) @@ -256,7 +256,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -268,7 +268,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -283,13 +283,13 @@ 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.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="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( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -346,7 +346,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -358,7 +358,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -380,7 +380,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -396,7 +396,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -415,7 +415,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -425,7 +425,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: 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( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -474,7 +474,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) @@ -482,7 +482,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -494,7 +494,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -509,20 +509,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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", + gre_tunnel_id="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( - "", + gre_tunnel_id="", 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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) @@ -530,7 +530,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @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", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -542,7 +542,7 @@ 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.magic_transit.gre_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -557,12 +557,12 @@ 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.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="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( - "", + gre_tunnel_id="", 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 18965ec738e..ef622e4b728 100644 --- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py +++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py @@ -98,7 +98,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -109,7 +109,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -131,7 +131,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -146,7 +146,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -164,7 +164,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -173,7 +173,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: 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( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -221,7 +221,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) @@ -229,7 +229,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -256,20 +256,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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", + ipsec_tunnel_id="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( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) @@ -277,7 +277,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -289,7 +289,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -304,20 +304,20 @@ 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.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="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( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_psk_generate(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -326,7 +326,7 @@ def test_method_psk_generate(self, client: Cloudflare) -> None: @parametrize def test_raw_response_psk_generate(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -339,7 +339,7 @@ def test_raw_response_psk_generate(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -355,14 +355,14 @@ def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: 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", + ipsec_tunnel_id="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( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -445,7 +445,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -456,7 +456,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -478,7 +478,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -493,7 +493,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -511,7 +511,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -520,7 +520,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: 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( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -568,7 +568,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) @@ -576,7 +576,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -588,7 +588,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -603,20 +603,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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", + ipsec_tunnel_id="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( - "", + ipsec_tunnel_id="", 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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) @@ -624,7 +624,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -636,7 +636,7 @@ 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.magic_transit.ipsec_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -651,20 +651,20 @@ 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.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="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( - "", + ipsec_tunnel_id="", 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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -673,7 +673,7 @@ async def test_method_psk_generate(self, async_client: AsyncCloudflare) -> None: @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -686,7 +686,7 @@ async def test_raw_response_psk_generate(self, async_client: AsyncCloudflare) -> @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", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -702,14 +702,14 @@ async def test_streaming_response_psk_generate(self, async_client: AsyncCloudfla 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", + ipsec_tunnel_id="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( - "", + ipsec_tunnel_id="", 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 c72aba2ffde..109d3b9f025 100644 --- a/tests/api_resources/magic_transit/test_routes.py +++ b/tests/api_resources/magic_transit/test_routes.py @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: route = client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -84,7 +84,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: route = client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -101,7 +101,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -116,7 +116,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -134,7 +134,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -143,7 +143,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.magic_transit.routes.with_raw_response.update( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -191,7 +191,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: route = client.magic_transit.routes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteDeleteResponse, route, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,13 +226,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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", + route_id="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( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -277,7 +277,7 @@ def test_path_params_empty(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: route = client.magic_transit.routes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteGetResponse, route, path=["response"]) @@ -285,7 +285,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -297,7 +297,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -312,13 +312,13 @@ 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.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="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( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -375,7 +375,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -386,7 +386,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -403,7 +403,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -418,7 +418,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -436,7 +436,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -445,7 +445,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: 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( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -493,7 +493,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteDeleteResponse, route, path=["response"]) @@ -501,7 +501,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -513,7 +513,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -528,13 +528,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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", + route_id="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( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -579,7 +579,7 @@ async def test_path_params_empty(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteGetResponse, route, path=["response"]) @@ -587,7 +587,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -599,7 +599,7 @@ 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.magic_transit.routes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -614,12 +614,12 @@ 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.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="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( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_sites.py b/tests/api_resources/magic_transit/test_sites.py index ea1cafd24af..e4556c64f70 100644 --- a/tests/api_resources/magic_transit/test_sites.py +++ b/tests/api_resources/magic_transit/test_sites.py @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="site_1", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", ha_mode=True, location={ "lat": "37.6192", @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: site = client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -89,10 +89,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: site = client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -117,7 +117,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -132,13 +132,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -191,7 +191,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: site = client.magic_transit.sites.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,20 +226,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: site = client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -247,10 +247,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: site = client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -263,7 +263,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -275,7 +275,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -290,20 +290,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.edit( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: site = client.magic_transit.sites.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -311,7 +311,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -323,7 +323,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -338,13 +338,13 @@ 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.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -366,7 +366,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="site_1", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", ha_mode=True, location={ "lat": "37.6192", @@ -413,7 +413,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -421,10 +421,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -437,7 +437,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -449,7 +449,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -464,13 +464,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -523,7 +523,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -531,7 +531,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -543,7 +543,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -558,20 +558,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -579,10 +579,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -595,7 +595,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -607,7 +607,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -622,20 +622,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.edit( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -643,7 +643,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -655,7 +655,7 @@ 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.magic_transit.sites.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -670,12 +670,12 @@ 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.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/mtls_certificates/test_associations.py b/tests/api_resources/mtls_certificates/test_associations.py index cce75fc9fec..8c28a978c39 100644 --- a/tests/api_resources/mtls_certificates/test_associations.py +++ b/tests/api_resources/mtls_certificates/test_associations.py @@ -20,7 +20,7 @@ class TestAssociations: @parametrize def test_method_get(self, client: Cloudflare) -> None: association = client.mtls_certificates.associations.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.mtls_certificates.associations.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): client.mtls_certificates.associations.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncAssociations: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: association = await async_client.mtls_certificates.associations.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.mtls_certificates.associations.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): await async_client.mtls_certificates.associations.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py index 4277e406662..ccaf45b9b4e 100644 --- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py +++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py @@ -110,7 +110,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -145,20 +145,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -166,7 +166,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -178,7 +178,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ 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 `zone_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -294,7 +294,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -302,7 +302,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -314,7 +314,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -329,20 +329,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -350,7 +350,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ 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.origin_tls_client_auth.hostnames.certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -377,12 +377,12 @@ 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 `zone_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/origin_tls_client_auth/test_hostnames.py b/tests/api_resources/origin_tls_client_auth/test_hostnames.py index 0bb7b13f294..1e361bb8ee9 100644 --- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py +++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py @@ -65,7 +65,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: hostname = client.origin_tls_client_auth.hostnames.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) @@ -73,7 +73,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -85,7 +85,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.with_streaming_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -100,13 +100,13 @@ 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 `zone_id` but received ''"): client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.origin_tls_client_auth.hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -159,7 +159,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.origin_tls_client_auth.hostnames.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) @@ -167,7 +167,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -179,7 +179,7 @@ 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.origin_tls_client_auth.hostnames.with_streaming_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -194,12 +194,12 @@ 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 `zone_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.origin_tls_client_auth.hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py index 74e8e45713e..1af65b2ef8f 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -78,7 +78,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: connection = client.page_shield.connections.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Connection], connection, path=["response"]) @@ -86,7 +86,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -98,7 +98,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.connections.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -113,13 +113,13 @@ 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 `zone_id` but received ''"): client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connection_id` but received ''"): client.page_shield.connections.with_raw_response.get( - "", + connection_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connection = await async_client.page_shield.connections.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Connection], connection, path=["response"]) @@ -195,7 +195,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -207,7 +207,7 @@ 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.page_shield.connections.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -222,12 +222,12 @@ 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 `zone_id` but received ''"): await async_client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connection_id` but received ''"): await async_client.page_shield.connections.with_raw_response.get( - "", + connection_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_cookies.py b/tests/api_resources/page_shield/test_cookies.py index 7c516ab4e7d..d3008ff641a 100644 --- a/tests/api_resources/page_shield/test_cookies.py +++ b/tests/api_resources/page_shield/test_cookies.py @@ -80,7 +80,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: cookie = client.page_shield.cookies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CookieGetResponse], cookie, path=["response"]) @@ -88,7 +88,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.cookies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -115,13 +115,13 @@ 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 `zone_id` but received ''"): client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cookie_id` but received ''"): client.page_shield.cookies.with_raw_response.get( - "", + cookie_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -191,7 +191,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cookie = await async_client.page_shield.cookies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CookieGetResponse], cookie, path=["response"]) @@ -199,7 +199,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ 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.page_shield.cookies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,12 +226,12 @@ 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 `zone_id` but received ''"): await async_client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cookie_id` but received ''"): await async_client.page_shield.cookies.with_raw_response.get( - "", + cookie_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py index d2ff101721c..375863ad9b6 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -84,7 +84,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="allow", description="Checkout page CSP policy", @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -117,7 +117,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -132,13 +132,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.page_shield.policies.with_raw_response.update( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -183,7 +183,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.page_shield.policies.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert policy is None @@ -191,7 +191,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -203,7 +203,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -218,20 +218,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.page_shield.policies.with_raw_response.delete( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.page_shield.policies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -239,7 +239,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -251,7 +251,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -266,13 +266,13 @@ 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 `zone_id` but received ''"): client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.page_shield.policies.with_raw_response.get( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -341,7 +341,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="allow", description="Checkout page CSP policy", @@ -362,7 +362,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -374,7 +374,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -389,13 +389,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.page_shield.policies.with_raw_response.update( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -440,7 +440,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert policy is None @@ -448,7 +448,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -460,7 +460,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -475,20 +475,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.page_shield.policies.with_raw_response.delete( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -496,7 +496,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -508,7 +508,7 @@ 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.page_shield.policies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -523,12 +523,12 @@ 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 `zone_id` but received ''"): await async_client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.page_shield.policies.with_raw_response.get( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py index c874f315be8..f8a9077bccf 100644 --- a/tests/api_resources/page_shield/test_scripts.py +++ b/tests/api_resources/page_shield/test_scripts.py @@ -79,7 +79,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: script = client.page_shield.scripts.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptGetResponse], script, path=["response"]) @@ -87,7 +87,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.scripts.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,13 +114,13 @@ 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 `zone_id` but received ''"): client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_id` but received ''"): client.page_shield.scripts.with_raw_response.get( - "", + script_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: script = await async_client.page_shield.scripts.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptGetResponse], script, path=["response"]) @@ -197,7 +197,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ 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.page_shield.scripts.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -224,12 +224,12 @@ 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 `zone_id` but received ''"): await async_client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_id` but received ''"): await async_client.page_shield.scripts.with_raw_response.get( - "", + script_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/pages/projects/deployments/history/test_logs.py b/tests/api_resources/pages/projects/deployments/history/test_logs.py index 03612af99fe..db7215a143b 100644 --- a/tests/api_resources/pages/projects/deployments/history/test_logs.py +++ b/tests/api_resources/pages/projects/deployments/history/test_logs.py @@ -20,7 +20,7 @@ class TestLogs: @parametrize def test_method_get(self, client: Cloudflare) -> None: log = client.pages.projects.deployments.history.logs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.deployments.history.logs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -58,21 +58,21 @@ 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.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.history.logs.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -84,7 +84,7 @@ class TestAsyncLogs: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: log = await async_client.pages.projects.deployments.history.logs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -106,7 +106,7 @@ 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.pages.projects.deployments.history.logs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -122,21 +122,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.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.history.logs.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py index 45e2f785dad..7c9203aa0c3 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -22,7 +22,7 @@ class TestDeployments: @parametrize def test_method_create(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Deployment, deployment, path=["response"]) @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", branch="staging", ) @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -70,20 +70,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"]) @@ -91,7 +91,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", env="preview", ) @@ -100,7 +100,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,20 +127,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -149,7 +149,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -162,7 +162,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -178,21 +178,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.delete( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -200,7 +200,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -209,7 +209,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -222,7 +222,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -238,21 +238,21 @@ 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.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -260,7 +260,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: @parametrize def test_method_retry(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -270,7 +270,7 @@ def test_method_retry(self, client: Cloudflare) -> None: @parametrize def test_raw_response_retry(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -284,7 +284,7 @@ def test_raw_response_retry(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_retry(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -301,7 +301,7 @@ def test_streaming_response_retry(self, client: Cloudflare) -> None: def test_path_params_retry(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -309,7 +309,7 @@ def test_path_params_retry(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -317,7 +317,7 @@ def test_path_params_retry(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.retry( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -326,7 +326,7 @@ def test_path_params_retry(self, client: Cloudflare) -> None: @parametrize def test_method_rollback(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -336,7 +336,7 @@ def test_method_rollback(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rollback(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -350,7 +350,7 @@ def test_raw_response_rollback(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rollback(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -367,7 +367,7 @@ def test_streaming_response_rollback(self, client: Cloudflare) -> None: def test_path_params_rollback(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -375,7 +375,7 @@ def test_path_params_rollback(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -383,7 +383,7 @@ def test_path_params_rollback(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.rollback( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -397,7 +397,7 @@ class TestAsyncDeployments: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Deployment, deployment, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", branch="staging", ) @@ -416,7 +416,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -429,7 +429,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -445,20 +445,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"]) @@ -466,7 +466,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", env="preview", ) @@ -475,7 +475,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -487,7 +487,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -502,20 +502,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -524,7 +524,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -537,7 +537,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -553,21 +553,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.delete( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -575,7 +575,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -584,7 +584,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -597,7 +597,7 @@ 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.pages.projects.deployments.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -613,21 +613,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.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -635,7 +635,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_retry(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -645,7 +645,7 @@ async def test_method_retry(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_retry(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -659,7 +659,7 @@ async def test_raw_response_retry(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_retry(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -676,7 +676,7 @@ async def test_streaming_response_retry(self, async_client: AsyncCloudflare) -> async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -684,7 +684,7 @@ async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -692,7 +692,7 @@ async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.retry( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -701,7 +701,7 @@ async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_rollback(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -711,7 +711,7 @@ async def test_method_rollback(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_rollback(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -725,7 +725,7 @@ async def test_raw_response_rollback(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_streaming_response_rollback(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -742,7 +742,7 @@ async def test_streaming_response_rollback(self, async_client: AsyncCloudflare) async def test_path_params_rollback(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -750,7 +750,7 @@ async def test_path_params_rollback(self, async_client: AsyncCloudflare) -> None with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -758,7 +758,7 @@ async def test_path_params_rollback(self, async_client: AsyncCloudflare) -> None with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.rollback( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, diff --git a/tests/api_resources/pages/projects/test_domains.py b/tests/api_resources/pages/projects/test_domains.py index 6fb601b3070..d99095ae14e 100644 --- a/tests/api_resources/pages/projects/test_domains.py +++ b/tests/api_resources/pages/projects/test_domains.py @@ -25,7 +25,7 @@ class TestDomains: @parametrize def test_method_create(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -47,7 +47,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) as response: @@ -63,14 +63,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={"name": "example.com"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -78,7 +78,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[object], domain, path=["response"]) @@ -86,7 +86,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -98,7 +98,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -113,20 +113,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -135,7 +135,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -148,7 +148,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -164,21 +164,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.pages.projects.domains.with_raw_response.delete( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -186,7 +186,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -196,7 +196,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -210,7 +210,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -227,7 +227,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", body={}, @@ -235,7 +235,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -243,7 +243,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.pages.projects.domains.with_raw_response.edit( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -252,7 +252,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -261,7 +261,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -274,7 +274,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -290,21 +290,21 @@ 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.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.pages.projects.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -316,7 +316,7 @@ class TestAsyncDomains: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -325,7 +325,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -338,7 +338,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) as response: @@ -354,14 +354,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={"name": "example.com"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -369,7 +369,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[object], domain, path=["response"]) @@ -377,7 +377,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -389,7 +389,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -404,20 +404,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -426,7 +426,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -439,7 +439,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -455,21 +455,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.delete( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -477,7 +477,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -487,7 +487,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -501,7 +501,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -518,7 +518,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", body={}, @@ -526,7 +526,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -534,7 +534,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.edit( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -543,7 +543,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -552,7 +552,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -565,7 +565,7 @@ 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.pages.projects.domains.with_streaming_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -581,21 +581,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.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py index c3f969b628b..44ce71019b1 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -191,7 +191,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: project = client.pages.projects.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,20 +226,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.delete( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: project = client.pages.projects.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -263,7 +263,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -291,7 +291,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -322,7 +322,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={ "deployment_configs": { @@ -344,7 +344,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.edit( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -367,7 +367,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: project = client.pages.projects.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Project, project, path=["response"]) @@ -375,7 +375,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -387,7 +387,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -402,20 +402,20 @@ 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.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.get( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_purge_build_cache(self, client: Cloudflare) -> None: project = client.pages.projects.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -423,7 +423,7 @@ def test_method_purge_build_cache(self, client: Cloudflare) -> None: @parametrize def test_raw_response_purge_build_cache(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -435,7 +435,7 @@ def test_raw_response_purge_build_cache(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_build_cache(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -450,13 +450,13 @@ def test_streaming_response_purge_build_cache(self, client: Cloudflare) -> None: def test_path_params_purge_build_cache(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.purge_build_cache( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -632,7 +632,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -640,7 +640,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -652,7 +652,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -667,20 +667,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.delete( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -704,7 +704,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -732,7 +732,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -763,7 +763,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={ "deployment_configs": { @@ -785,7 +785,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.edit( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -808,7 +808,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Project, project, path=["response"]) @@ -816,7 +816,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -828,7 +828,7 @@ 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.pages.projects.with_streaming_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -843,20 +843,20 @@ 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.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.get( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_purge_build_cache(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -864,7 +864,7 @@ async def test_method_purge_build_cache(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_purge_build_cache(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -876,7 +876,7 @@ async def test_raw_response_purge_build_cache(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_purge_build_cache(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -891,12 +891,12 @@ async def test_streaming_response_purge_build_cache(self, async_client: AsyncClo async def test_path_params_purge_build_cache(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.purge_build_cache( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/pcaps/test_download.py b/tests/api_resources/pcaps/test_download.py index ee286a6f414..95dae97f261 100644 --- a/tests/api_resources/pcaps/test_download.py +++ b/tests/api_resources/pcaps/test_download.py @@ -30,7 +30,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.pcaps.download.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -46,7 +46,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -62,7 +62,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.pcaps.download.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -79,13 +79,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): client.pcaps.download.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.pcaps.download.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -116,7 +116,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.pcaps.download.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -149,12 +149,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): await async_client.pcaps.download.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/pcaps/test_ownership.py b/tests/api_resources/pcaps/test_ownership.py index b1032e3d9e3..e6854449f2d 100644 --- a/tests/api_resources/pcaps/test_ownership.py +++ b/tests/api_resources/pcaps/test_ownership.py @@ -62,7 +62,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ownership = client.pcaps.ownership.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert ownership is None @@ -70,7 +70,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -82,7 +82,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pcaps.ownership.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -97,13 +97,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ownership_id` but received ''"): client.pcaps.ownership.with_raw_response.delete( - "", + ownership_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -240,7 +240,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.pcaps.ownership.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert ownership is None @@ -248,7 +248,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.ownership.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -275,13 +275,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ownership_id` but received ''"): await async_client.pcaps.ownership.with_raw_response.delete( - "", + ownership_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/queues/test_consumers.py b/tests/api_resources/queues/test_consumers.py index 39efe21c453..4cca547cf8c 100644 --- a/tests/api_resources/queues/test_consumers.py +++ b/tests/api_resources/queues/test_consumers.py @@ -25,7 +25,7 @@ class TestConsumers: @parametrize def test_method_create(self, client: Cloudflare) -> None: consumer = client.queues.consumers.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -44,7 +44,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -67,7 +67,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -93,7 +93,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={ "dead_letter_queue": "example-dlq", @@ -110,7 +110,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.create( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -128,7 +128,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: consumer = client.queues.consumers.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -143,7 +143,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -162,7 +162,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -184,7 +184,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -197,7 +197,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", body={ @@ -210,7 +210,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): client.queues.consumers.with_raw_response.update( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -224,7 +224,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: consumer = client.queues.consumers.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -233,7 +233,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -246,7 +246,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -262,21 +262,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): client.queues.consumers.with_raw_response.delete( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: consumer = client.queues.consumers.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) @@ -292,7 +292,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -304,7 +304,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -319,13 +319,13 @@ 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.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -336,7 +336,7 @@ class TestAsyncConsumers: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -355,7 +355,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -378,7 +378,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -404,7 +404,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={ "dead_letter_queue": "example-dlq", @@ -421,7 +421,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.create( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -439,7 +439,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -454,7 +454,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -473,7 +473,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -495,7 +495,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -508,7 +508,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", body={ @@ -521,7 +521,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): await async_client.queues.consumers.with_raw_response.update( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -535,7 +535,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -544,7 +544,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -557,7 +557,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -573,21 +573,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): await async_client.queues.consumers.with_raw_response.delete( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -595,7 +595,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) @@ -603,7 +603,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -615,7 +615,7 @@ 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.queues.consumers.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -630,12 +630,12 @@ 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.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/queues/test_messages.py b/tests/api_resources/queues/test_messages.py index 709728a1ff1..6052877da88 100644 --- a/tests/api_resources/queues/test_messages.py +++ b/tests/api_resources/queues/test_messages.py @@ -20,7 +20,7 @@ class TestMessages: @parametrize def test_method_ack(self, client: Cloudflare) -> None: message = client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) @@ -28,7 +28,7 @@ def test_method_ack(self, client: Cloudflare) -> None: @parametrize def test_method_ack_with_all_params(self, client: Cloudflare) -> None: message = client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", acks=[ { @@ -61,7 +61,7 @@ def test_method_ack_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_ack(self, client: Cloudflare) -> None: response = client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -73,7 +73,7 @@ def test_raw_response_ack(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_ack(self, client: Cloudflare) -> None: with client.queues.messages.with_streaming_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -88,20 +88,20 @@ def test_streaming_response_ack(self, client: Cloudflare) -> None: def test_path_params_ack(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.messages.with_raw_response.ack( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_pull(self, client: Cloudflare) -> None: message = client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) @@ -109,7 +109,7 @@ def test_method_pull(self, client: Cloudflare) -> None: @parametrize def test_method_pull_with_all_params(self, client: Cloudflare) -> None: message = client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", batch_size=10, visibility_timeout_ms=1000, @@ -119,7 +119,7 @@ def test_method_pull_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_pull(self, client: Cloudflare) -> None: response = client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_pull(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_pull(self, client: Cloudflare) -> None: with client.queues.messages.with_streaming_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -146,13 +146,13 @@ def test_streaming_response_pull(self, client: Cloudflare) -> None: def test_path_params_pull(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.messages.with_raw_response.pull( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -163,7 +163,7 @@ class TestAsyncMessages: @parametrize async def test_method_ack(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) @@ -171,7 +171,7 @@ async def test_method_ack(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_ack_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", acks=[ { @@ -204,7 +204,7 @@ async def test_method_ack_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_ack(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ async def test_raw_response_ack(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_ack(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.messages.with_streaming_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -231,20 +231,20 @@ async def test_streaming_response_ack(self, async_client: AsyncCloudflare) -> No async def test_path_params_ack(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.messages.with_raw_response.ack( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_pull(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) @@ -252,7 +252,7 @@ async def test_method_pull(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_pull_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", batch_size=10, visibility_timeout_ms=1000, @@ -262,7 +262,7 @@ async def test_method_pull_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_pull(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -274,7 +274,7 @@ async def test_raw_response_pull(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_pull(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.messages.with_streaming_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -289,12 +289,12 @@ async def test_streaming_response_pull(self, async_client: AsyncCloudflare) -> N async def test_path_params_pull(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.messages.with_raw_response.pull( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py index 0b1049530c9..491c61664c1 100644 --- a/tests/api_resources/r2/test_buckets.py +++ b/tests/api_resources/r2/test_buckets.py @@ -81,7 +81,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: bucket = client.r2.buckets.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - cursor="string", + cursor="cursor", direction="desc", name_contains="my-bucket", order="name", @@ -124,7 +124,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: bucket = client.r2.buckets.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, bucket, path=["response"]) @@ -132,7 +132,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -144,7 +144,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -159,20 +159,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.buckets.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: bucket = client.r2.buckets.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Bucket, bucket, path=["response"]) @@ -180,7 +180,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -192,7 +192,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -207,13 +207,13 @@ 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.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.buckets.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - cursor="string", + cursor="cursor", direction="desc", name_contains="my-bucket", order="name", @@ -327,7 +327,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, bucket, path=["response"]) @@ -335,7 +335,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -347,7 +347,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.buckets.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -362,20 +362,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.buckets.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Bucket, bucket, path=["response"]) @@ -383,7 +383,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -395,7 +395,7 @@ 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.r2.buckets.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -410,12 +410,12 @@ 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.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.buckets.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/r2/test_sippy.py b/tests/api_resources/r2/test_sippy.py index b3005ce3cc9..fa63c6f67c9 100644 --- a/tests/api_resources/r2/test_sippy.py +++ b/tests/api_resources/r2/test_sippy.py @@ -20,7 +20,7 @@ class TestSippy: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -28,19 +28,19 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "access_key_id": "string", - "bucket": "string", + "access_key_id": "accessKeyId", + "bucket": "bucket", "provider": "aws", - "region": "string", - "secret_access_key": "string", + "region": "region", + "secret_access_key": "secretAccessKey", }, ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -48,7 +48,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -60,7 +60,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -75,20 +75,20 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -96,17 +96,17 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "bucket": "string", - "client_email": "string", - "private_key": "string", + "bucket": "bucket", + "client_email": "clientEmail", + "private_key": "privateKey", "provider": "gcs", }, ) @@ -115,7 +115,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -127,7 +127,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -142,20 +142,20 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: sippy = client.r2.sippy.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) @@ -163,7 +163,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -175,7 +175,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -190,20 +190,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: sippy = client.r2.sippy.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -211,7 +211,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ 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.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -255,7 +255,7 @@ class TestAsyncSippy: @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -263,19 +263,19 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "access_key_id": "string", - "bucket": "string", + "access_key_id": "accessKeyId", + "bucket": "bucket", "provider": "aws", - "region": "string", - "secret_access_key": "string", + "region": "region", + "secret_access_key": "secretAccessKey", }, ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -283,7 +283,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -295,7 +295,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -310,20 +310,20 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -331,17 +331,17 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "bucket": "string", - "client_email": "string", - "private_key": "string", + "bucket": "bucket", + "client_email": "clientEmail", + "private_key": "privateKey", "provider": "gcs", }, ) @@ -350,7 +350,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -377,20 +377,20 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) @@ -398,7 +398,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -410,7 +410,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -425,20 +425,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -446,7 +446,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -458,7 +458,7 @@ 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.r2.sippy.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -473,12 +473,12 @@ 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.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/radar/as112/test_top.py b/tests/api_resources/radar/as112/test_top.py index 43a3546a5de..a97851a7967 100644 --- a/tests/api_resources/radar/as112/test_top.py +++ b/tests/api_resources/radar/as112/test_top.py @@ -26,14 +26,14 @@ class TestTop: @parametrize def test_method_dnssec(self, client: Cloudflare) -> None: top = client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) @parametrize def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -57,7 +57,7 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_dnssec(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert response.is_closed is True @@ -68,7 +68,7 @@ def test_raw_response_dnssec(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_dnssec(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -81,14 +81,14 @@ def test_streaming_response_dnssec(self, client: Cloudflare) -> None: @parametrize def test_method_edns(self, client: Cloudflare) -> None: top = client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert_matches_type(TopEdnsResponse, top, path=["response"]) @parametrize def test_method_edns_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -112,7 +112,7 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edns(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert response.is_closed is True @@ -123,7 +123,7 @@ def test_raw_response_edns(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edns(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -136,14 +136,14 @@ def test_streaming_response_edns(self, client: Cloudflare) -> None: @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: top = client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -167,7 +167,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.ip_version( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -178,7 +178,7 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.ip_version( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -243,14 +243,14 @@ class TestAsyncTop: @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) @parametrize async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -274,7 +274,7 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert response.is_closed is True @@ -285,7 +285,7 @@ async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -298,14 +298,14 @@ async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_edns(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert_matches_type(TopEdnsResponse, top, path=["response"]) @parametrize async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -329,7 +329,7 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert response.is_closed is True @@ -340,7 +340,7 @@ async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -353,14 +353,14 @@ async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -384,7 +384,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.ip_version( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -395,7 +395,7 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.ip_version( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/bgp/hijacks/test_events.py b/tests/api_resources/radar/bgp/hijacks/test_events.py index 806bea3adbe..950799cb558 100644 --- a/tests/api_resources/radar/bgp/hijacks/test_events.py +++ b/tests/api_resources/radar/bgp/hijacks/test_events.py @@ -34,7 +34,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: format="JSON", hijacker_asn=0, involved_asn=0, - involved_country="string", + involved_country="involvedCountry", max_confidence=0, min_confidence=0, page=0, @@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) format="JSON", hijacker_asn=0, involved_asn=0, - involved_country="string", + involved_country="involvedCountry", max_confidence=0, min_confidence=0, page=0, diff --git a/tests/api_resources/radar/bgp/leaks/test_events.py b/tests/api_resources/radar/bgp/leaks/test_events.py index 8c4feb02045..03b6644d96e 100644 --- a/tests/api_resources/radar/bgp/leaks/test_events.py +++ b/tests/api_resources/radar/bgp/leaks/test_events.py @@ -33,7 +33,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: event_id=0, format="JSON", involved_asn=0, - involved_country="string", + involved_country="involvedCountry", leak_asn=0, page=0, per_page=0, @@ -80,7 +80,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) event_id=0, format="JSON", involved_asn=0, - involved_country="string", + involved_country="involvedCountry", leak_asn=0, page=0, per_page=0, diff --git a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py index 52b80c305fa..47f0c6b92ca 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py @@ -21,14 +21,14 @@ class TestMalicious: @parametrize def test_method_get(self, client: Cloudflare) -> None: malicious = client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: malicious = client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -55,7 +55,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.malicious.with_raw_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.malicious.with_streaming_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,14 +83,14 @@ class TestAsyncMalicious: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: malicious = await async_client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: malicious = await async_client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -117,7 +117,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.malicious.with_raw_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert response.is_closed is True @@ -128,7 +128,7 @@ 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.radar.email.security.top.tlds.malicious.with_streaming_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spam.py b/tests/api_resources/radar/email/security/top/tlds/test_spam.py index b1d72e3f234..d8ea7caf83c 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spam.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spam.py @@ -21,14 +21,14 @@ class TestSpam: @parametrize def test_method_get(self, client: Cloudflare) -> None: spam = client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", ) assert_matches_type(SpamGetResponse, spam, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: spam = client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -55,7 +55,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.spam.with_raw_response.get( - "SPAM", + spam="SPAM", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.spam.with_streaming_response.get( - "SPAM", + spam="SPAM", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,14 +83,14 @@ class TestAsyncSpam: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: spam = await async_client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", ) assert_matches_type(SpamGetResponse, spam, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: spam = await async_client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -117,7 +117,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.spam.with_raw_response.get( - "SPAM", + spam="SPAM", ) assert response.is_closed is True @@ -128,7 +128,7 @@ 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.radar.email.security.top.tlds.spam.with_streaming_response.get( - "SPAM", + spam="SPAM", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py index e18cd2bc350..552471930fd 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py @@ -21,14 +21,14 @@ class TestSpoof: @parametrize def test_method_get(self, client: Cloudflare) -> None: spoof = client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: spoof = client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -55,7 +55,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.spoof.with_raw_response.get( - "SPOOF", + spoof="SPOOF", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.spoof.with_streaming_response.get( - "SPOOF", + spoof="SPOOF", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,14 +83,14 @@ class TestAsyncSpoof: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: spoof = await async_client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: spoof = await async_client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -117,7 +117,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.spoof.with_raw_response.get( - "SPOOF", + spoof="SPOOF", ) assert response.is_closed is True @@ -128,7 +128,7 @@ 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.radar.email.security.top.tlds.spoof.with_streaming_response.get( - "SPOOF", + spoof="SPOOF", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/entities/test_asns.py b/tests/api_resources/radar/entities/test_asns.py index 0a1ad904dc7..78555b0de2d 100644 --- a/tests/api_resources/radar/entities/test_asns.py +++ b/tests/api_resources/radar/entities/test_asns.py @@ -62,14 +62,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.get( - 3, + asn=3, ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.get( - 3, + asn=3, format="JSON", ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @@ -77,7 +77,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.get( - 3, + asn=3, ) assert response.is_closed is True @@ -88,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.get( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,14 +140,14 @@ def test_streaming_response_ip(self, client: Cloudflare) -> None: @parametrize def test_method_rel(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.rel( - 3, + asn=3, ) assert_matches_type(ASNRelResponse, asn, path=["response"]) @parametrize def test_method_rel_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.rel( - 3, + asn=3, asn2=0, format="JSON", ) @@ -156,7 +156,7 @@ def test_method_rel_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rel(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.rel( - 3, + asn=3, ) assert response.is_closed is True @@ -167,7 +167,7 @@ def test_raw_response_rel(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rel(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.rel( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,14 +221,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.get( - 3, + asn=3, ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.get( - 3, + asn=3, format="JSON", ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @@ -236,7 +236,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.get( - 3, + asn=3, ) assert response.is_closed is True @@ -247,7 +247,7 @@ 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.radar.entities.asns.with_streaming_response.get( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -299,14 +299,14 @@ async def test_streaming_response_ip(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_rel(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.rel( - 3, + asn=3, ) assert_matches_type(ASNRelResponse, asn, path=["response"]) @parametrize async def test_method_rel_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.rel( - 3, + asn=3, asn2=0, format="JSON", ) @@ -315,7 +315,7 @@ async def test_method_rel_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_rel(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.rel( - 3, + asn=3, ) assert response.is_closed is True @@ -326,7 +326,7 @@ async def test_raw_response_rel(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_rel(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.asns.with_streaming_response.rel( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/entities/test_locations.py b/tests/api_resources/radar/entities/test_locations.py index 6cb88295e26..b7fedeea1e4 100644 --- a/tests/api_resources/radar/entities/test_locations.py +++ b/tests/api_resources/radar/entities/test_locations.py @@ -58,14 +58,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.radar.entities.locations.get( - "US", + location="US", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: location = client.radar.entities.locations.get( - "US", + location="US", format="JSON", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @@ -73,7 +73,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.entities.locations.with_raw_response.get( - "US", + location="US", ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.entities.locations.with_streaming_response.get( - "US", + location="US", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,7 +98,7 @@ 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 `location` but received ''"): client.radar.entities.locations.with_raw_response.get( - "", + location="", ) @@ -143,14 +143,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.get( - "US", + location="US", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.get( - "US", + location="US", format="JSON", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @@ -158,7 +158,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.locations.with_raw_response.get( - "US", + location="US", ) assert response.is_closed is True @@ -169,7 +169,7 @@ 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.radar.entities.locations.with_streaming_response.get( - "US", + location="US", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -183,5 +183,5 @@ 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 `location` but received ''"): await async_client.radar.entities.locations.with_raw_response.get( - "", + location="", ) diff --git a/tests/api_resources/radar/http/ases/test_bot_class.py b/tests/api_resources/radar/http/ases/test_bot_class.py index 564e181cc75..43dfccdf6fa 100644 --- a/tests/api_resources/radar/http/ases/test_bot_class.py +++ b/tests/api_resources/radar/http/ases/test_bot_class.py @@ -21,14 +21,14 @@ class TestBotClass: @parametrize def test_method_get(self, client: Cloudflare) -> None: bot_class = client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bot_class = client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBotClass: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.ases.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_browser_family.py b/tests/api_resources/radar/http/ases/test_browser_family.py index e518c1a525c..518b019bc9b 100644 --- a/tests/api_resources/radar/http/ases/test_browser_family.py +++ b/tests/api_resources/radar/http/ases/test_browser_family.py @@ -21,14 +21,14 @@ class TestBrowserFamily: @parametrize def test_method_get(self, client: Cloudflare) -> None: browser_family = client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: browser_family = client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBrowserFamily: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.ases.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_device_type.py b/tests/api_resources/radar/http/ases/test_device_type.py index 18a6ccfcaa8..82a48550643 100644 --- a/tests/api_resources/radar/http/ases/test_device_type.py +++ b/tests/api_resources/radar/http/ases/test_device_type.py @@ -21,14 +21,14 @@ class TestDeviceType: @parametrize def test_method_get(self, client: Cloudflare) -> None: device_type = client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: device_type = client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncDeviceType: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.ases.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_http_method.py b/tests/api_resources/radar/http/ases/test_http_method.py index b045223539b..69ab4182496 100644 --- a/tests/api_resources/radar/http/ases/test_http_method.py +++ b/tests/api_resources/radar/http/ases/test_http_method.py @@ -21,14 +21,14 @@ class TestHTTPMethod: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_method = client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_method = client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncHTTPMethod: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.ases.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_http_protocol.py b/tests/api_resources/radar/http/ases/test_http_protocol.py index b13753a4caf..8651316350b 100644 --- a/tests/api_resources/radar/http/ases/test_http_protocol.py +++ b/tests/api_resources/radar/http/ases/test_http_protocol.py @@ -21,14 +21,14 @@ class TestHTTPProtocol: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_protocol = client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_protocol = client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -58,7 +58,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -69,7 +69,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,14 +86,14 @@ class TestAsyncHTTPProtocol: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -123,7 +123,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -134,7 +134,7 @@ 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.radar.http.ases.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_ip_version.py b/tests/api_resources/radar/http/ases/test_ip_version.py index 3e16cb9c9e7..f9abf302b8a 100644 --- a/tests/api_resources/radar/http/ases/test_ip_version.py +++ b/tests/api_resources/radar/http/ases/test_ip_version.py @@ -21,14 +21,14 @@ class TestIPVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_version = client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip_version = client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncIPVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.ases.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_os.py b/tests/api_resources/radar/http/ases/test_os.py index c0e46c14ef3..b06f72f2b6c 100644 --- a/tests/api_resources/radar/http/ases/test_os.py +++ b/tests/api_resources/radar/http/ases/test_os.py @@ -21,14 +21,14 @@ class TestOS: @parametrize def test_method_get(self, client: Cloudflare) -> None: os = client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: os = client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncOS: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.ases.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_tls_version.py b/tests/api_resources/radar/http/ases/test_tls_version.py index 68e968ef510..1ee28eb9c84 100644 --- a/tests/api_resources/radar/http/ases/test_tls_version.py +++ b/tests/api_resources/radar/http/ases/test_tls_version.py @@ -21,14 +21,14 @@ class TestTLSVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_version = client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: tls_version = client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncTLSVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.ases.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_bot_class.py b/tests/api_resources/radar/http/locations/test_bot_class.py index 93040e13c86..f80aa0f4018 100644 --- a/tests/api_resources/radar/http/locations/test_bot_class.py +++ b/tests/api_resources/radar/http/locations/test_bot_class.py @@ -21,14 +21,14 @@ class TestBotClass: @parametrize def test_method_get(self, client: Cloudflare) -> None: bot_class = client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bot_class = client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBotClass: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.locations.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_browser_family.py b/tests/api_resources/radar/http/locations/test_browser_family.py index b0f7066f74d..07964a092a1 100644 --- a/tests/api_resources/radar/http/locations/test_browser_family.py +++ b/tests/api_resources/radar/http/locations/test_browser_family.py @@ -21,14 +21,14 @@ class TestBrowserFamily: @parametrize def test_method_get(self, client: Cloudflare) -> None: browser_family = client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: browser_family = client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBrowserFamily: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.locations.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_device_type.py b/tests/api_resources/radar/http/locations/test_device_type.py index 3f4d5e56b40..15ae343d0f8 100644 --- a/tests/api_resources/radar/http/locations/test_device_type.py +++ b/tests/api_resources/radar/http/locations/test_device_type.py @@ -21,14 +21,14 @@ class TestDeviceType: @parametrize def test_method_get(self, client: Cloudflare) -> None: device_type = client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: device_type = client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncDeviceType: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.locations.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_http_method.py b/tests/api_resources/radar/http/locations/test_http_method.py index 267001342c1..dd3f53d5eda 100644 --- a/tests/api_resources/radar/http/locations/test_http_method.py +++ b/tests/api_resources/radar/http/locations/test_http_method.py @@ -21,14 +21,14 @@ class TestHTTPMethod: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_method = client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_method = client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncHTTPMethod: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.locations.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_http_protocol.py b/tests/api_resources/radar/http/locations/test_http_protocol.py index 2a6a9294a30..8c5abee1834 100644 --- a/tests/api_resources/radar/http/locations/test_http_protocol.py +++ b/tests/api_resources/radar/http/locations/test_http_protocol.py @@ -21,14 +21,14 @@ class TestHTTPProtocol: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_protocol = client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_protocol = client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -58,7 +58,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -69,7 +69,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,14 +86,14 @@ class TestAsyncHTTPProtocol: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -123,7 +123,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -134,7 +134,7 @@ 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.radar.http.locations.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_ip_version.py b/tests/api_resources/radar/http/locations/test_ip_version.py index fd6c5769745..47315faea87 100644 --- a/tests/api_resources/radar/http/locations/test_ip_version.py +++ b/tests/api_resources/radar/http/locations/test_ip_version.py @@ -21,14 +21,14 @@ class TestIPVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_version = client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip_version = client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncIPVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.locations.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_os.py b/tests/api_resources/radar/http/locations/test_os.py index 98253fe4e0f..2006ca10d2d 100644 --- a/tests/api_resources/radar/http/locations/test_os.py +++ b/tests/api_resources/radar/http/locations/test_os.py @@ -21,14 +21,14 @@ class TestOS: @parametrize def test_method_get(self, client: Cloudflare) -> None: os = client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: os = client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncOS: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.locations.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_tls_version.py b/tests/api_resources/radar/http/locations/test_tls_version.py index 10fbe092c1e..af160f32587 100644 --- a/tests/api_resources/radar/http/locations/test_tls_version.py +++ b/tests/api_resources/radar/http/locations/test_tls_version.py @@ -21,14 +21,14 @@ class TestTLSVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_version = client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: tls_version = client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncTLSVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -136,7 +136,7 @@ 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.radar.http.locations.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/ranking/test_domain.py b/tests/api_resources/radar/ranking/test_domain.py index 780aa445d02..058290c4c9f 100644 --- a/tests/api_resources/radar/ranking/test_domain.py +++ b/tests/api_resources/radar/ranking/test_domain.py @@ -20,14 +20,14 @@ class TestDomain: @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.radar.ranking.domain.get( - "google.com", + domain="google.com", ) assert_matches_type(DomainGetResponse, domain, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain = client.radar.ranking.domain.get( - "google.com", + domain="google.com", date=["string", "string", "string"], format="JSON", limit=5, @@ -39,7 +39,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.ranking.domain.with_raw_response.get( - "google.com", + domain="google.com", ) assert response.is_closed is True @@ -50,7 +50,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.ranking.domain.with_streaming_response.get( - "google.com", + domain="google.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,7 +64,7 @@ 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 `domain` but received ''"): client.radar.ranking.domain.with_raw_response.get( - "", + domain="", ) @@ -74,14 +74,14 @@ class TestAsyncDomain: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.radar.ranking.domain.get( - "google.com", + domain="google.com", ) assert_matches_type(DomainGetResponse, domain, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.radar.ranking.domain.get( - "google.com", + domain="google.com", date=["string", "string", "string"], format="JSON", limit=5, @@ -93,7 +93,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.ranking.domain.with_raw_response.get( - "google.com", + domain="google.com", ) assert response.is_closed is True @@ -104,7 +104,7 @@ 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.radar.ranking.domain.with_streaming_response.get( - "google.com", + domain="google.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -118,5 +118,5 @@ 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 `domain` but received ''"): await async_client.radar.ranking.domain.with_raw_response.get( - "", + domain="", ) diff --git a/tests/api_resources/registrar/test_domains.py b/tests/api_resources/registrar/test_domains.py index 5c0d686188c..2418c2d157e 100644 --- a/tests/api_resources/registrar/test_domains.py +++ b/tests/api_resources/registrar/test_domains.py @@ -21,7 +21,7 @@ class TestDomains: @parametrize def test_method_update(self, client: Cloudflare) -> None: domain = client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: domain = client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_renew=True, locked=False, @@ -40,7 +40,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.registrar.domains.with_streaming_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,13 +67,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.registrar.domains.with_raw_response.update( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -118,7 +118,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.registrar.domains.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) @@ -126,7 +126,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -138,7 +138,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.registrar.domains.with_streaming_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -153,13 +153,13 @@ 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.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.registrar.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -170,7 +170,7 @@ class TestAsyncDomains: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) @@ -178,7 +178,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_renew=True, locked=False, @@ -189,7 +189,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -201,7 +201,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.registrar.domains.with_streaming_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -216,13 +216,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.registrar.domains.with_raw_response.update( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -267,7 +267,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) @@ -275,7 +275,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -287,7 +287,7 @@ 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.registrar.domains.with_streaming_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -302,12 +302,12 @@ 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.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.registrar.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/request_tracers/test_traces.py b/tests/api_resources/request_tracers/test_traces.py index ce807ccc33d..92147ae93ba 100644 --- a/tests/api_resources/request_tracers/test_traces.py +++ b/tests/api_resources/request_tracers/test_traces.py @@ -35,21 +35,21 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: body={ "base64": "c29tZV9yZXF1ZXN0X2JvZHk=", "json": {}, - "plain_text": "string", + "plain_text": "plain_text", }, context={ "bot_score": 0, "geoloc": { "city": "London", - "continent": "string", + "continent": "continent", "is_eu_country": True, - "iso_code": "string", + "iso_code": "iso_code", "latitude": 0, "longitude": 0, - "postal_code": "string", - "region_code": "string", - "subdivision_2_iso_code": "string", - "timezone": "string", + "postal_code": "postal_code", + "region_code": "region_code", + "subdivision_2_iso_code": "subdivision_2_iso_code", + "timezone": "timezone", }, "skip_challenge": True, "threat_score": 0, @@ -126,21 +126,21 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare body={ "base64": "c29tZV9yZXF1ZXN0X2JvZHk=", "json": {}, - "plain_text": "string", + "plain_text": "plain_text", }, context={ "bot_score": 0, "geoloc": { "city": "London", - "continent": "string", + "continent": "continent", "is_eu_country": True, - "iso_code": "string", + "iso_code": "iso_code", "latitude": 0, "longitude": 0, - "postal_code": "string", - "region_code": "string", - "subdivision_2_iso_code": "string", - "timezone": "string", + "postal_code": "postal_code", + "region_code": "region_code", + "subdivision_2_iso_code": "subdivision_2_iso_code", + "timezone": "timezone", }, "skip_challenge": True, "threat_score": 0, diff --git a/tests/api_resources/rules/lists/test_bulk_operations.py b/tests/api_resources/rules/lists/test_bulk_operations.py index fa3248c9b0f..cea227ed259 100644 --- a/tests/api_resources/rules/lists/test_bulk_operations.py +++ b/tests/api_resources/rules/lists/test_bulk_operations.py @@ -20,7 +20,7 @@ class TestBulkOperations: @parametrize def test_method_get(self, client: Cloudflare) -> None: bulk_operation = client.rules.lists.bulk_operations.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.bulk_operations.with_streaming_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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_identifier` but received ''"): client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.rules.lists.bulk_operations.with_raw_response.get( - "", + operation_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncBulkOperations: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bulk_operation = await async_client.rules.lists.bulk_operations.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.rules.lists.bulk_operations.with_streaming_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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_identifier` but received ''"): await async_client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.rules.lists.bulk_operations.with_raw_response.get( - "", + operation_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index 6a2e0fab264..591f68417ff 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -26,7 +26,7 @@ class TestItems: @parametrize def test_method_create(self, client: Cloudflare) -> None: item = client.rules.lists.items.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -64,14 +64,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.create( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -79,7 +79,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: item = client.rules.lists.items.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -88,7 +88,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -101,7 +101,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -117,14 +117,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -132,7 +132,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: item = client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncCursorPagination[object], item, path=["response"]) @@ -140,7 +140,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: item = client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="zzz", per_page=1, @@ -151,7 +151,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -163,7 +163,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -178,20 +178,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.list( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: item = client.rules.lists.items.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,20 +226,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: item = client.rules.lists.items.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -248,7 +248,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -261,7 +261,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) as response: @@ -277,21 +277,21 @@ 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_identifier` but received ''"): client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): client.rules.lists.items.with_raw_response.get( - "", + item_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -303,7 +303,7 @@ class TestAsyncItems: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -312,7 +312,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -325,7 +325,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -341,14 +341,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.create( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -356,7 +356,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -365,7 +365,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -378,7 +378,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -394,14 +394,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -409,7 +409,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncCursorPagination[object], item, path=["response"]) @@ -417,7 +417,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="zzz", per_page=1, @@ -428,7 +428,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -440,7 +440,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -455,20 +455,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.list( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) @@ -476,7 +476,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -488,7 +488,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -503,20 +503,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -525,7 +525,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -538,7 +538,7 @@ 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.rules.lists.items.with_streaming_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) as response: @@ -554,21 +554,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_identifier` but received ''"): await async_client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): await async_client.rules.lists.items.with_raw_response.get( - "", + item_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py index b42d1525efc..c14548725c1 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -83,7 +83,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: list_ = client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: list_ = client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) @@ -102,7 +102,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -115,7 +115,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -131,13 +131,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: list_ = client.rules.lists.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -190,7 +190,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -202,7 +202,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -217,13 +217,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -231,7 +231,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: list_ = client.rules.lists.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -253,7 +253,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -269,13 +269,13 @@ 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.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.with_raw_response.get( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -348,7 +348,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -357,7 +357,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) @@ -367,7 +367,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -380,7 +380,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -396,13 +396,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -447,7 +447,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -455,7 +455,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -467,7 +467,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -482,13 +482,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -496,7 +496,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -505,7 +505,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -518,7 +518,7 @@ 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.rules.lists.with_streaming_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -534,12 +534,12 @@ 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.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.with_raw_response.get( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index f763170399e..2e285e86c92 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -22,8 +22,8 @@ class TestVersions: @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -31,8 +31,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -40,8 +40,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -53,8 +53,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.phases.versions.with_streaming_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,23 +69,23 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -93,9 +93,9 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -103,9 +103,9 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -117,9 +117,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.phases.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -134,23 +134,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 `ruleset_version` but received ''"): client.rulesets.phases.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) @@ -161,8 +161,8 @@ class TestAsyncVersions: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -170,8 +170,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -179,8 +179,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -192,8 +192,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.versions.with_streaming_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -208,23 +208,23 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -232,9 +232,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -242,9 +242,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -256,9 +256,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.rulesets.phases.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -273,21 +273,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 `ruleset_version` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py index 8abeef8e3df..c795b8c6f79 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -21,9 +21,9 @@ class TestPhases: @parametrize def test_method_update(self, client: Cloudflare) -> None: phase = client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) @@ -31,7 +31,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: phase = client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[ { "action": "block", @@ -82,7 +82,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", name="My ruleset", ) @@ -92,9 +92,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -106,9 +106,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rulesets.phases.with_streaming_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -123,24 +123,24 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -148,8 +148,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -157,8 +157,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -170,8 +170,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.phases.with_streaming_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -186,14 +186,14 @@ 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.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) @@ -204,9 +204,9 @@ class TestAsyncPhases: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) @@ -214,7 +214,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[ { "action": "block", @@ -265,7 +265,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", name="My ruleset", ) @@ -275,9 +275,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -289,9 +289,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.with_streaming_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -306,24 +306,24 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -331,8 +331,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -340,8 +340,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -353,8 +353,8 @@ 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.rulesets.phases.with_streaming_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -369,12 +369,12 @@ 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.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index 090bf6fd02c..381720e4919 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -25,8 +25,8 @@ class TestRules: @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -34,8 +34,8 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -57,8 +57,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -70,8 +70,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,28 +86,28 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -115,8 +115,8 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -132,8 +132,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -145,8 +145,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,28 +161,28 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -190,8 +190,8 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -207,8 +207,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -220,8 +220,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -236,28 +236,28 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: def test_path_params_create_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -265,8 +265,8 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -307,8 +307,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -320,8 +320,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -336,28 +336,28 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: def test_path_params_create_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -365,8 +365,8 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -382,8 +382,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -395,8 +395,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -411,28 +411,28 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -440,8 +440,8 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -457,8 +457,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -470,8 +470,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -486,28 +486,28 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -515,8 +515,8 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -532,8 +532,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -545,8 +545,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -561,28 +561,28 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -590,8 +590,8 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -617,8 +617,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -630,8 +630,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -646,28 +646,28 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -675,8 +675,8 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -703,8 +703,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -716,8 +716,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -732,28 +732,28 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: def test_path_params_create_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -761,8 +761,8 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -785,8 +785,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -798,8 +798,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -814,28 +814,28 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None def test_path_params_create_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -843,8 +843,8 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -860,8 +860,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -873,8 +873,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -889,28 +889,28 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None def test_path_params_create_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -918,8 +918,8 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -939,8 +939,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -952,8 +952,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -968,28 +968,28 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None def test_path_params_create_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -997,8 +997,8 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -1036,8 +1036,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1049,8 +1049,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1065,28 +1065,28 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None def test_path_params_create_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1094,8 +1094,8 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -1117,8 +1117,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1130,8 +1130,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1146,28 +1146,28 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None def test_path_params_create_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1175,8 +1175,8 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -1271,8 +1271,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1284,8 +1284,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1300,28 +1300,28 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None def test_path_params_create_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1329,8 +1329,8 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -1350,8 +1350,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1363,8 +1363,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1379,28 +1379,28 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None def test_path_params_create_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1408,8 +1408,8 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -1425,8 +1425,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1438,8 +1438,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1454,28 +1454,28 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None def test_path_params_create_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1483,8 +1483,8 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -1500,8 +1500,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1513,8 +1513,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1529,29 +1529,29 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None def test_path_params_create_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -1559,9 +1559,9 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: rule = client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -1569,9 +1569,9 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1583,9 +1583,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1600,39 +1600,39 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1640,9 +1640,9 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -1664,9 +1664,9 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1678,9 +1678,9 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1695,39 +1695,39 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1735,9 +1735,9 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -1753,9 +1753,9 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1767,9 +1767,9 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1784,39 +1784,39 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1824,9 +1824,9 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -1842,9 +1842,9 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1856,9 +1856,9 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1873,39 +1873,39 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1913,9 +1913,9 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -1956,9 +1956,9 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1970,9 +1970,9 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1987,39 +1987,39 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2027,9 +2027,9 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -2045,9 +2045,9 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2059,9 +2059,9 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2076,39 +2076,39 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2116,9 +2116,9 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -2134,9 +2134,9 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2148,9 +2148,9 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2165,39 +2165,39 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2205,9 +2205,9 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -2223,9 +2223,9 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2237,9 +2237,9 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2254,39 +2254,39 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2294,9 +2294,9 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -2322,9 +2322,9 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2336,9 +2336,9 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2353,39 +2353,39 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2393,9 +2393,9 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -2422,9 +2422,9 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2436,9 +2436,9 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2453,39 +2453,39 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2493,9 +2493,9 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -2518,9 +2518,9 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2532,9 +2532,9 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2549,39 +2549,39 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2589,9 +2589,9 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -2607,9 +2607,9 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2621,9 +2621,9 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2638,39 +2638,39 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2678,9 +2678,9 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -2700,9 +2700,9 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2714,9 +2714,9 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2731,39 +2731,39 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2771,9 +2771,9 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -2811,9 +2811,9 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2825,9 +2825,9 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2842,39 +2842,39 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2882,9 +2882,9 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -2906,9 +2906,9 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2920,9 +2920,9 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2937,39 +2937,39 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2977,9 +2977,9 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -3074,9 +3074,9 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3088,9 +3088,9 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3105,39 +3105,39 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -3145,9 +3145,9 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -3167,9 +3167,9 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3181,9 +3181,9 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3198,39 +3198,39 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -3238,9 +3238,9 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -3256,9 +3256,9 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3270,9 +3270,9 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3287,39 +3287,39 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -3327,9 +3327,9 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -3345,9 +3345,9 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3359,9 +3359,9 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3376,30 +3376,30 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @@ -3410,8 +3410,8 @@ class TestAsyncRules: @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3419,8 +3419,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -3442,8 +3442,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3455,8 +3455,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3471,28 +3471,28 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3500,8 +3500,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -3517,8 +3517,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3530,8 +3530,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3546,28 +3546,28 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3575,8 +3575,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -3592,8 +3592,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3605,8 +3605,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3621,28 +3621,28 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3650,8 +3650,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -3692,8 +3692,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3705,8 +3705,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3721,28 +3721,28 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3750,8 +3750,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -3767,8 +3767,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3780,8 +3780,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3796,28 +3796,28 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3825,8 +3825,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -3842,8 +3842,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3855,8 +3855,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3871,28 +3871,28 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3900,8 +3900,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -3917,8 +3917,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3930,8 +3930,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3946,28 +3946,28 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3975,8 +3975,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -4002,8 +4002,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4015,8 +4015,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4031,28 +4031,28 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4060,8 +4060,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -4088,8 +4088,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4101,8 +4101,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4117,28 +4117,28 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4146,8 +4146,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -4170,8 +4170,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4183,8 +4183,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4199,28 +4199,28 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4228,8 +4228,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -4245,8 +4245,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4258,8 +4258,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4274,28 +4274,28 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4303,8 +4303,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -4324,8 +4324,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4337,8 +4337,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4353,28 +4353,28 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4382,8 +4382,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -4421,8 +4421,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4434,8 +4434,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4450,28 +4450,28 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4479,8 +4479,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -4502,8 +4502,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4515,8 +4515,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4531,28 +4531,28 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4560,8 +4560,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -4656,8 +4656,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4669,8 +4669,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4685,28 +4685,28 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4714,8 +4714,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -4735,8 +4735,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4748,8 +4748,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4764,28 +4764,28 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4793,8 +4793,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -4810,8 +4810,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4823,8 +4823,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4839,28 +4839,28 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4868,8 +4868,8 @@ 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: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -4885,8 +4885,8 @@ 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.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4898,8 +4898,8 @@ 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.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4914,29 +4914,29 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -4944,9 +4944,9 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -4954,9 +4954,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4968,9 +4968,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4985,39 +4985,39 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5025,9 +5025,9 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -5049,9 +5049,9 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5063,9 +5063,9 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5080,39 +5080,39 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5120,9 +5120,9 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -5138,9 +5138,9 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5152,9 +5152,9 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5169,39 +5169,39 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5209,9 +5209,9 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -5227,9 +5227,9 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5241,9 +5241,9 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5258,39 +5258,39 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5298,9 +5298,9 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -5341,9 +5341,9 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5355,9 +5355,9 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5372,39 +5372,39 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5412,9 +5412,9 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -5430,9 +5430,9 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5444,9 +5444,9 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5461,39 +5461,39 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5501,9 +5501,9 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -5519,9 +5519,9 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5533,9 +5533,9 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5550,39 +5550,39 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5590,9 +5590,9 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -5608,9 +5608,9 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5622,9 +5622,9 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5639,39 +5639,39 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5679,9 +5679,9 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -5707,9 +5707,9 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5721,9 +5721,9 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5738,39 +5738,39 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5778,9 +5778,9 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -5807,9 +5807,9 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5821,9 +5821,9 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5838,39 +5838,39 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5878,9 +5878,9 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -5903,9 +5903,9 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5917,9 +5917,9 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5934,39 +5934,39 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5974,9 +5974,9 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -5992,9 +5992,9 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6006,9 +6006,9 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6023,39 +6023,39 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6063,9 +6063,9 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -6085,9 +6085,9 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6099,9 +6099,9 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6116,39 +6116,39 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6156,9 +6156,9 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -6196,9 +6196,9 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6210,9 +6210,9 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6227,39 +6227,39 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6267,9 +6267,9 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -6291,9 +6291,9 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6305,9 +6305,9 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6322,39 +6322,39 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6362,9 +6362,9 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -6459,9 +6459,9 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6473,9 +6473,9 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6490,39 +6490,39 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6530,9 +6530,9 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -6552,9 +6552,9 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async @parametrize async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6566,9 +6566,9 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6583,39 +6583,39 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6623,9 +6623,9 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -6641,9 +6641,9 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async @parametrize async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6655,9 +6655,9 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6672,39 +6672,39 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6712,9 +6712,9 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -6730,9 +6730,9 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async @parametrize async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6744,9 +6744,9 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6761,28 +6761,28 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou 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 `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index 3106292143c..67582d09bf4 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -22,8 +22,8 @@ class TestVersions: @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -31,8 +31,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -40,8 +40,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -53,8 +53,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,29 +69,29 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.with_raw_response.list( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: version = client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -99,9 +99,9 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -109,9 +109,9 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -123,9 +123,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,39 +140,39 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): client.rulesets.versions.with_raw_response.delete( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -180,9 +180,9 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -190,9 +190,9 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -204,9 +204,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,30 +221,30 @@ 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 `ruleset_id` but received ''"): client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): client.rulesets.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @@ -255,8 +255,8 @@ class TestAsyncVersions: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -264,8 +264,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -273,8 +273,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -286,8 +286,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -302,29 +302,29 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -332,9 +332,9 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -342,9 +342,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -356,9 +356,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -373,39 +373,39 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -413,9 +413,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -423,9 +423,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -437,9 +437,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.rulesets.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -454,28 +454,28 @@ 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 `ruleset_id` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/versions/test_by_tag.py b/tests/api_resources/rulesets/versions/test_by_tag.py index 6122739a88f..01267ce0ff9 100644 --- a/tests/api_resources/rulesets/versions/test_by_tag.py +++ b/tests/api_resources/rulesets/versions/test_by_tag.py @@ -20,7 +20,7 @@ class TestByTag: @parametrize def test_method_get(self, client: Cloudflare) -> None: by_tag = client.rulesets.versions.by_tag.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -30,7 +30,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -44,7 +44,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.versions.by_tag.with_streaming_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -61,7 +61,7 @@ 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.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -69,7 +69,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="", ruleset_version="1", @@ -77,7 +77,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="", @@ -85,7 +85,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_tag` but received ''"): client.rulesets.versions.by_tag.with_raw_response.get( - "", + rule_tag="", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -98,7 +98,7 @@ class TestAsyncByTag: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: by_tag = await async_client.rulesets.versions.by_tag.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -108,7 +108,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -122,7 +122,7 @@ 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.rulesets.versions.by_tag.with_streaming_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -139,7 +139,7 @@ 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.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -147,7 +147,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="", ruleset_version="1", @@ -155,7 +155,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): await async_client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="", @@ -163,7 +163,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_tag` but received ''"): await async_client.rulesets.versions.by_tag.with_raw_response.get( - "", + rule_tag="", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py index 41a20cc0ee4..6cdb5f5db36 100644 --- a/tests/api_resources/rum/test_rules.py +++ b/tests/api_resources/rum/test_rules.py @@ -20,7 +20,7 @@ class TestRules: @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", host="example.com", inclusive=True, @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,20 +67,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.create( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -89,7 +89,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", host="example.com", @@ -102,7 +102,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -115,7 +115,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -131,21 +131,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rum.rules.with_raw_response.update( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -153,7 +153,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.rum.rules.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) @@ -161,7 +161,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -173,7 +173,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -188,20 +188,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.list( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.rum.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -210,7 +210,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -223,7 +223,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -239,21 +239,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rum.rules.with_raw_response.delete( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -265,7 +265,7 @@ class TestAsyncRules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) @@ -273,7 +273,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", host="example.com", inclusive=True, @@ -285,7 +285,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -297,7 +297,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -312,20 +312,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.create( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -334,7 +334,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", host="example.com", @@ -347,7 +347,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -360,7 +360,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -376,21 +376,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rum.rules.with_raw_response.update( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -398,7 +398,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -418,7 +418,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -433,20 +433,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.list( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -455,7 +455,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -468,7 +468,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -484,21 +484,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rum.rules.with_raw_response.delete( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) diff --git a/tests/api_resources/rum/test_site_info.py b/tests/api_resources/rum/test_site_info.py index 2e72e44a04e..dbd592cad22 100644 --- a/tests/api_resources/rum/test_site_info.py +++ b/tests/api_resources/rum/test_site_info.py @@ -72,7 +72,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: site_info = client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -80,7 +80,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: site_info = client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_install=True, host="example.com", @@ -91,7 +91,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -103,7 +103,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -118,13 +118,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.rum.site_info.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -179,7 +179,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: site_info = client.rum.site_info.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) @@ -187,7 +187,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -199,7 +199,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -214,20 +214,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.rum.site_info.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: site_info = client.rum.site_info.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -235,7 +235,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -247,7 +247,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -262,13 +262,13 @@ 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.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.rum.site_info.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -327,7 +327,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -335,7 +335,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_install=True, host="example.com", @@ -346,7 +346,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -358,7 +358,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -373,13 +373,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.rum.site_info.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -434,7 +434,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) @@ -442,7 +442,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,20 +469,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.rum.site_info.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -490,7 +490,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -502,7 +502,7 @@ 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.rum.site_info.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -517,12 +517,12 @@ 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.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.rum.site_info.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/secondary_dns/test_acls.py b/tests/api_resources/secondary_dns/test_acls.py index 6723d4ab22d..421109936c4 100644 --- a/tests/api_resources/secondary_dns/test_acls.py +++ b/tests/api_resources/secondary_dns/test_acls.py @@ -67,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -77,7 +77,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -91,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -108,7 +108,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ip_range="192.0.2.53/28", name="my-acl-1", @@ -116,7 +116,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.secondary_dns.acls.with_raw_response.update( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -163,7 +163,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) @@ -171,7 +171,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -183,7 +183,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -198,20 +198,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.secondary_dns.acls.with_raw_response.delete( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACL], acl, path=["response"]) @@ -219,7 +219,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -231,7 +231,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -246,13 +246,13 @@ 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.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.secondary_dns.acls.with_raw_response.get( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -309,7 +309,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -319,7 +319,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -333,7 +333,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -350,7 +350,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ip_range="192.0.2.53/28", name="my-acl-1", @@ -358,7 +358,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.update( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -405,7 +405,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) @@ -413,7 +413,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -425,7 +425,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -440,20 +440,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.delete( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACL], acl, path=["response"]) @@ -461,7 +461,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -473,7 +473,7 @@ 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.secondary_dns.acls.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -488,12 +488,12 @@ 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.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.get( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/secondary_dns/test_peers.py b/tests/api_resources/secondary_dns/test_peers.py index 9129014f7bd..82430f212f7 100644 --- a/tests/api_resources/secondary_dns/test_peers.py +++ b/tests/api_resources/secondary_dns/test_peers.py @@ -67,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ip="192.0.2.53", @@ -89,7 +89,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -102,7 +102,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) as response: @@ -118,14 +118,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", name="my-peer-1", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): client.secondary_dns.peers.with_raw_response.update( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -171,7 +171,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) @@ -179,7 +179,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -191,7 +191,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -206,20 +206,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): client.secondary_dns.peers.with_raw_response.delete( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[Peer], peer, path=["response"]) @@ -227,7 +227,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -239,7 +239,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -254,13 +254,13 @@ 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.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): client.secondary_dns.peers.with_raw_response.get( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -317,7 +317,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -326,7 +326,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ip="192.0.2.53", @@ -339,7 +339,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -352,7 +352,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) as response: @@ -368,14 +368,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", name="my-peer-1", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.update( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -421,7 +421,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) @@ -429,7 +429,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -441,7 +441,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -456,20 +456,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.delete( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[Peer], peer, path=["response"]) @@ -477,7 +477,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -489,7 +489,7 @@ 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.secondary_dns.peers.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -504,12 +504,12 @@ 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.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.get( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/secondary_dns/test_tsigs.py b/tests/api_resources/secondary_dns/test_tsigs.py index cfc48b5b25e..c75273b7eef 100644 --- a/tests/api_resources/secondary_dns/test_tsigs.py +++ b/tests/api_resources/secondary_dns/test_tsigs.py @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -82,7 +82,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -97,7 +97,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -115,7 +115,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -124,7 +124,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.update( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -172,7 +172,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) @@ -180,7 +180,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -192,7 +192,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -207,20 +207,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.delete( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) @@ -228,7 +228,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -240,7 +240,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -255,13 +255,13 @@ 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.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.get( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -322,7 +322,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -333,7 +333,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -348,7 +348,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -366,7 +366,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -375,7 +375,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.update( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -423,7 +423,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) @@ -431,7 +431,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -443,7 +443,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -458,20 +458,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.delete( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) @@ -479,7 +479,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -491,7 +491,7 @@ 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.secondary_dns.tsigs.with_streaming_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -506,12 +506,12 @@ 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.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.get( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/snippets/test_content.py b/tests/api_resources/snippets/test_content.py index 752e1d2e2a5..371c111994b 100644 --- a/tests/api_resources/snippets/test_content.py +++ b/tests/api_resources/snippets/test_content.py @@ -31,7 +31,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: return_value=httpx.Response(200, json={"foo": "bar"}) ) content = client.snippets.content.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -48,7 +48,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ) content = client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -65,7 +65,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.snippets.content.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -83,13 +83,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.content.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -105,7 +105,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR return_value=httpx.Response(200, json={"foo": "bar"}) ) content = await async_client.snippets.content.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -122,7 +122,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ) content = await async_client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.snippets.content.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -157,12 +157,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.content.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py index fa152873a47..de18b708629 100644 --- a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py +++ b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py @@ -20,14 +20,14 @@ class TestCurrents: @parametrize def test_method_get(self, client: Cloudflare) -> None: current = client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CurrentGetResponse, current, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: current = client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", app_id_param="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", app_id="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", colo_name="PDX", @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -48,7 +48,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.aggregates.currents.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,7 +62,7 @@ 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 `zone` but received ''"): client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "", + zone="", ) @@ -72,14 +72,14 @@ class TestAsyncCurrents: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: current = await async_client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CurrentGetResponse, current, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: current = await async_client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", app_id_param="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", app_id="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", colo_name="PDX", @@ -89,7 +89,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -100,7 +100,7 @@ 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.spectrum.analytics.aggregates.currents.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,5 +114,5 @@ 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 `zone` but received ''"): await async_client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "", + zone="", ) diff --git a/tests/api_resources/spectrum/analytics/events/test_bytimes.py b/tests/api_resources/spectrum/analytics/events/test_bytimes.py index 57a939363a2..70f1ba3f65d 100644 --- a/tests/api_resources/spectrum/analytics/events/test_bytimes.py +++ b/tests/api_resources/spectrum/analytics/events/test_bytimes.py @@ -21,14 +21,14 @@ class TestBytimes: @parametrize def test_method_get(self, client: Cloudflare) -> None: bytime = client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bytime = client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -42,7 +42,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.events.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -53,7 +53,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.events.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,7 +67,7 @@ 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 `zone` but received ''"): client.spectrum.analytics.events.bytimes.with_raw_response.get( - "", + zone="", ) @@ -77,14 +77,14 @@ class TestAsyncBytimes: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -98,7 +98,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.events.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -109,7 +109,7 @@ 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.spectrum.analytics.events.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -123,5 +123,5 @@ 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 `zone` but received ''"): await async_client.spectrum.analytics.events.bytimes.with_raw_response.get( - "", + zone="", ) diff --git a/tests/api_resources/spectrum/analytics/events/test_summaries.py b/tests/api_resources/spectrum/analytics/events/test_summaries.py index abccd1640c3..d1e1bedcdf7 100644 --- a/tests/api_resources/spectrum/analytics/events/test_summaries.py +++ b/tests/api_resources/spectrum/analytics/events/test_summaries.py @@ -21,14 +21,14 @@ class TestSummaries: @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -41,7 +41,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.events.summaries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -52,7 +52,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.events.summaries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,7 +66,7 @@ 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 `zone` but received ''"): client.spectrum.analytics.events.summaries.with_raw_response.get( - "", + zone="", ) @@ -76,14 +76,14 @@ class TestAsyncSummaries: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -96,7 +96,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.events.summaries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -107,7 +107,7 @@ 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.spectrum.analytics.events.summaries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -121,5 +121,5 @@ 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 `zone` but received ''"): await async_client.spectrum.analytics.events.summaries.with_raw_response.get( - "", + zone="", ) diff --git a/tests/api_resources/spectrum/test_apps.py b/tests/api_resources/spectrum/test_apps.py index cdd400dea70..58722950191 100644 --- a/tests/api_resources/spectrum/test_apps.py +++ b/tests/api_resources/spectrum/test_apps.py @@ -26,7 +26,7 @@ class TestApps: @parametrize def test_method_create(self, client: Cloudflare) -> None: app = client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", "type": "CNAME", @@ -64,7 +64,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -79,7 +79,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -97,7 +97,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.create( - "", + zone="", dns={}, origin_dns={}, origin_port=22, @@ -107,7 +107,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: app = client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -119,7 +119,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", @@ -147,7 +147,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -163,7 +163,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -182,7 +182,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", dns={}, origin_dns={}, @@ -192,7 +192,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.spectrum.apps.with_raw_response.update( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -203,14 +203,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: app = client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[object], app, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order="protocol", page=1, @@ -221,7 +221,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -232,7 +232,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -246,13 +246,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.list( - "", + zone="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: app = client.spectrum.apps.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -260,7 +260,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -272,7 +272,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -287,20 +287,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.spectrum.apps.with_raw_response.delete( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: app = client.spectrum.apps.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AppGetResponse, app, path=["response"]) @@ -308,7 +308,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -320,7 +320,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -335,13 +335,13 @@ 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 `zone` but received ''"): client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.spectrum.apps.with_raw_response.get( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -352,7 +352,7 @@ class TestAsyncApps: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -363,7 +363,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", "type": "CNAME", @@ -390,7 +390,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -405,7 +405,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -423,7 +423,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.create( - "", + zone="", dns={}, origin_dns={}, origin_port=22, @@ -433,7 +433,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -445,7 +445,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", @@ -473,7 +473,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -489,7 +489,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -508,7 +508,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", dns={}, origin_dns={}, @@ -518,7 +518,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.spectrum.apps.with_raw_response.update( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -529,14 +529,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[object], app, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order="protocol", page=1, @@ -547,7 +547,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -558,7 +558,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -572,13 +572,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.list( - "", + zone="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -586,7 +586,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -598,7 +598,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -613,20 +613,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.spectrum.apps.with_raw_response.delete( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AppGetResponse, app, path=["response"]) @@ -634,7 +634,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -646,7 +646,7 @@ 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.spectrum.apps.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -661,12 +661,12 @@ 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 `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.spectrum.apps.with_raw_response.get( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/speed/pages/test_tests.py b/tests/api_resources/speed/pages/test_tests.py index 5d768ba427c..9bc7170f416 100644 --- a/tests/api_resources/speed/pages/test_tests.py +++ b/tests/api_resources/speed/pages/test_tests.py @@ -24,7 +24,7 @@ class TestTests: @parametrize def test_method_create(self, client: Cloudflare) -> None: test = client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Test], test, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: test = client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,20 +68,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: test = client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(TestListResponse, test, path=["response"]) @@ -89,7 +89,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: test = client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=20, @@ -100,7 +100,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,20 +127,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.list( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: test = client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) @@ -148,7 +148,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: test = client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -157,7 +157,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -169,7 +169,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -184,20 +184,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: test = client.speed.pages.tests.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -206,7 +206,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -219,7 +219,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) as response: @@ -235,21 +235,21 @@ 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 `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="", url="example.com", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.speed.pages.tests.with_raw_response.get( - "", + test_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -261,7 +261,7 @@ class TestAsyncTests: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Test], test, path=["response"]) @@ -269,7 +269,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -278,7 +278,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -290,7 +290,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.tests.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -305,20 +305,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(TestListResponse, test, path=["response"]) @@ -326,7 +326,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=20, @@ -337,7 +337,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,7 +349,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.tests.with_streaming_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -364,20 +364,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.list( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) @@ -385,7 +385,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -394,7 +394,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -406,7 +406,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.tests.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -421,20 +421,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -443,7 +443,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -456,7 +456,7 @@ 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.speed.pages.tests.with_streaming_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) as response: @@ -472,21 +472,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 `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="", url="example.com", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.get( - "", + test_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) diff --git a/tests/api_resources/speed/test_pages.py b/tests/api_resources/speed/test_pages.py index 0d259ddcb4a..611a73ec015 100644 --- a/tests/api_resources/speed/test_pages.py +++ b/tests/api_resources/speed/test_pages.py @@ -61,13 +61,13 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_trend(self, client: Cloudflare) -> None: page = client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -75,13 +75,13 @@ def test_method_trend(self, client: Cloudflare) -> None: @parametrize def test_method_trend_with_all_params(self, client: Cloudflare) -> None: page = client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", end=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -90,13 +90,13 @@ def test_method_trend_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_trend(self, client: Cloudflare) -> None: response = client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert response.is_closed is True @@ -108,13 +108,13 @@ def test_raw_response_trend(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_trend(self, client: Cloudflare) -> None: with client.speed.pages.with_streaming_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -129,24 +129,24 @@ def test_streaming_response_trend(self, client: Cloudflare) -> None: def test_path_params_trend(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.with_raw_response.trend( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) @@ -195,13 +195,13 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_trend(self, async_client: AsyncCloudflare) -> None: page = await async_client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -209,13 +209,13 @@ async def test_method_trend(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_trend_with_all_params(self, async_client: AsyncCloudflare) -> None: page = await async_client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", end=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -224,13 +224,13 @@ async def test_method_trend_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_trend(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert response.is_closed is True @@ -242,13 +242,13 @@ async def test_raw_response_trend(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_trend(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.with_streaming_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -263,22 +263,22 @@ async def test_streaming_response_trend(self, async_client: AsyncCloudflare) -> async def test_path_params_trend(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.with_raw_response.trend( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) diff --git a/tests/api_resources/speed/test_schedule.py b/tests/api_resources/speed/test_schedule.py index 4a20e89f851..e3e05e0ed53 100644 --- a/tests/api_resources/speed/test_schedule.py +++ b/tests/api_resources/speed/test_schedule.py @@ -24,7 +24,7 @@ class TestSchedule: @parametrize def test_method_create(self, client: Cloudflare) -> None: schedule = client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: schedule = client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.speed.schedule.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,20 +68,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.schedule.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: schedule = client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) @@ -89,7 +89,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: schedule = client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -98,7 +98,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -110,7 +110,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.speed.schedule.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -125,20 +125,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.schedule.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: schedule = client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Schedule], schedule, path=["response"]) @@ -146,7 +146,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: schedule = client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -155,7 +155,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -167,7 +167,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.speed.schedule.with_streaming_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -182,13 +182,13 @@ 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 `zone_id` but received ''"): client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.schedule.with_raw_response.get( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -199,7 +199,7 @@ class TestAsyncSchedule: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) @@ -207,7 +207,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -216,7 +216,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -228,7 +228,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.schedule.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -243,20 +243,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.schedule.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) @@ -264,7 +264,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -273,7 +273,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.schedule.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -300,20 +300,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.schedule.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Schedule], schedule, path=["response"]) @@ -321,7 +321,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -330,7 +330,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -342,7 +342,7 @@ 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.speed.schedule.with_streaming_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -357,12 +357,12 @@ 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 `zone_id` but received ''"): await async_client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.schedule.with_raw_response.get( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/ssl/test_certificate_packs.py b/tests/api_resources/ssl/test_certificate_packs.py index 865b9acef62..6bef155e88b 100644 --- a/tests/api_resources/ssl/test_certificate_packs.py +++ b/tests/api_resources/ssl/test_certificate_packs.py @@ -71,7 +71,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) @@ -79,7 +79,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -91,7 +91,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -106,20 +106,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.certificate_packs.with_raw_response.delete( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -128,7 +128,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -141,7 +141,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -157,14 +157,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.certificate_packs.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -172,7 +172,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) @@ -180,7 +180,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -192,7 +192,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -207,13 +207,13 @@ 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 `zone_id` but received ''"): client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.certificate_packs.with_raw_response.get( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) @@ -278,7 +278,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -290,7 +290,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -305,20 +305,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.delete( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -327,7 +327,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -340,7 +340,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -356,14 +356,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -371,7 +371,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) @@ -379,7 +379,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -391,7 +391,7 @@ 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.ssl.certificate_packs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -406,12 +406,12 @@ 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 `zone_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.get( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/ssl/test_verification.py b/tests/api_resources/ssl/test_verification.py index 2f83b897384..4d6460a428d 100644 --- a/tests/api_resources/ssl/test_verification.py +++ b/tests/api_resources/ssl/test_verification.py @@ -23,7 +23,7 @@ class TestVerification: @parametrize def test_method_edit(self, client: Cloudflare) -> None: verification = client.ssl.verification.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -32,7 +32,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -45,7 +45,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.ssl.verification.with_streaming_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) as response: @@ -61,14 +61,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="", validation_method="txt", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.verification.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -126,7 +126,7 @@ class TestAsyncVerification: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: verification = await async_client.ssl.verification.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -135,7 +135,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -148,7 +148,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.verification.with_streaming_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) as response: @@ -164,14 +164,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="", validation_method="txt", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.verification.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) diff --git a/tests/api_resources/stream/captions/language/test_vtt.py b/tests/api_resources/stream/captions/language/test_vtt.py index 64b2a97f352..c3e6421643b 100644 --- a/tests/api_resources/stream/captions/language/test_vtt.py +++ b/tests/api_resources/stream/captions/language/test_vtt.py @@ -19,7 +19,7 @@ class TestVtt: @parametrize def test_method_get(self, client: Cloudflare) -> None: vtt = client.stream.captions.language.vtt.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -41,7 +41,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.language.vtt.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -57,21 +57,21 @@ 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.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): client.stream.captions.language.vtt.with_raw_response.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -83,7 +83,7 @@ class TestAsyncVtt: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: vtt = await async_client.stream.captions.language.vtt.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -92,7 +92,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -105,7 +105,7 @@ 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.stream.captions.language.vtt.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -121,21 +121,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.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="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.vtt.with_raw_response.get( - "tr", + language="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.vtt.with_raw_response.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) diff --git a/tests/api_resources/stream/captions/test_language.py b/tests/api_resources/stream/captions/test_language.py index cdcc495bcd5..0fe61c3cb38 100644 --- a/tests/api_resources/stream/captions/test_language.py +++ b/tests/api_resources/stream/captions/test_language.py @@ -20,7 +20,7 @@ class TestLanguage: @parametrize def test_method_create(self, client: Cloudflare) -> None: language = client.stream.captions.language.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -42,7 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -58,21 +58,21 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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", + language="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", + language="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( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: language = client.stream.captions.language.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -107,7 +107,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -125,7 +125,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -133,7 +133,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", file="@/Users/kyle/Desktop/tr.vtt", @@ -141,7 +141,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): client.stream.captions.language.with_raw_response.update( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -150,7 +150,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: language = client.stream.captions.language.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -159,7 +159,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -172,7 +172,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -188,21 +188,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.captions.language.with_raw_response.delete( - "tr", + language="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.delete( - "tr", + language="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.delete( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -210,7 +210,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: language = client.stream.captions.language.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -219,7 +219,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -232,7 +232,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -248,21 +248,21 @@ 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.stream.captions.language.with_raw_response.get( - "tr", + language="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.get( - "tr", + language="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.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -274,7 +274,7 @@ class TestAsyncLanguage: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -283,7 +283,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -296,7 +296,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -312,21 +312,21 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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", + language="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", + language="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( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -335,7 +335,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -346,7 +346,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -361,7 +361,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -379,7 +379,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -387,7 +387,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", file="@/Users/kyle/Desktop/tr.vtt", @@ -395,7 +395,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): await async_client.stream.captions.language.with_raw_response.update( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -404,7 +404,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -413,7 +413,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -426,7 +426,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -442,21 +442,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.captions.language.with_raw_response.delete( - "tr", + language="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.delete( - "tr", + language="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.delete( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -464,7 +464,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -473,7 +473,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -486,7 +486,7 @@ 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.stream.captions.language.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -502,21 +502,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.stream.captions.language.with_raw_response.get( - "tr", + language="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.get( - "tr", + language="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.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) diff --git a/tests/api_resources/stream/live_inputs/test_outputs.py b/tests/api_resources/stream/live_inputs/test_outputs.py index b20c437529f..d1041731a3f 100644 --- a/tests/api_resources/stream/live_inputs/test_outputs.py +++ b/tests/api_resources/stream/live_inputs/test_outputs.py @@ -21,7 +21,7 @@ class TestOutputs: @parametrize def test_method_create(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -73,7 +73,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.create( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -90,7 +90,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -100,7 +100,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -114,7 +114,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -131,7 +131,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -139,7 +139,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", enabled=True, @@ -147,7 +147,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.update( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -156,7 +156,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Output], output, path=["response"]) @@ -164,7 +164,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -176,7 +176,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -191,20 +191,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.list( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -213,7 +213,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -226,7 +226,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) as response: @@ -242,21 +242,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.delete( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -268,7 +268,7 @@ class TestAsyncOutputs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -278,7 +278,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -289,7 +289,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -303,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -320,7 +320,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -328,7 +328,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.create( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -337,7 +337,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -347,7 +347,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -361,7 +361,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -378,7 +378,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -386,7 +386,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", enabled=True, @@ -394,7 +394,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.update( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -403,7 +403,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Output], output, path=["response"]) @@ -411,7 +411,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -423,7 +423,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -438,20 +438,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.list( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -460,7 +460,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -473,7 +473,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) as response: @@ -489,21 +489,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.delete( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) diff --git a/tests/api_resources/stream/test_audio_tracks.py b/tests/api_resources/stream/test_audio_tracks.py index b1af748dc56..026c7c2486f 100644 --- a/tests/api_resources/stream/test_audio_tracks.py +++ b/tests/api_resources/stream/test_audio_tracks.py @@ -24,7 +24,7 @@ class TestAudioTracks: @parametrize def test_method_delete(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -33,7 +33,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -46,7 +46,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -62,21 +62,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): client.stream.audio_tracks.with_raw_response.delete( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -84,7 +84,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_copy(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -93,7 +93,7 @@ def test_method_copy(self, client: Cloudflare) -> None: @parametrize def test_method_copy_with_all_params(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", @@ -103,7 +103,7 @@ def test_method_copy_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_copy(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -116,7 +116,7 @@ def test_raw_response_copy(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_copy(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) as response: @@ -132,14 +132,14 @@ def test_streaming_response_copy(self, client: Cloudflare) -> None: def test_path_params_copy(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", label="director commentary", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.copy( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -147,7 +147,7 @@ def test_path_params_copy(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -156,7 +156,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", default=True, @@ -167,7 +167,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -180,7 +180,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -196,21 +196,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): client.stream.audio_tracks.with_raw_response.edit( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -218,7 +218,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) @@ -226,7 +226,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -253,13 +253,13 @@ 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.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ class TestAsyncAudioTracks: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -279,7 +279,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -292,7 +292,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -308,21 +308,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.delete( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -330,7 +330,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_copy(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -339,7 +339,7 @@ async def test_method_copy(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_copy_with_all_params(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", @@ -349,7 +349,7 @@ async def test_method_copy_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_copy(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -362,7 +362,7 @@ async def test_raw_response_copy(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_copy(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) as response: @@ -378,14 +378,14 @@ async def test_streaming_response_copy(self, async_client: AsyncCloudflare) -> N async def test_path_params_copy(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.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", label="director commentary", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.copy( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -393,7 +393,7 @@ async def test_path_params_copy(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -402,7 +402,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", default=True, @@ -413,7 +413,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -426,7 +426,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -442,21 +442,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.edit( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -464,7 +464,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) @@ -472,7 +472,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -484,7 +484,7 @@ 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.stream.audio_tracks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -499,12 +499,12 @@ 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.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_captions.py b/tests/api_resources/stream/test_captions.py index 4361d07217d..75cf3073069 100644 --- a/tests/api_resources/stream/test_captions.py +++ b/tests/api_resources/stream/test_captions.py @@ -20,7 +20,7 @@ class TestCaptions: @parametrize def test_method_get(self, client: Cloudflare) -> None: caption = client.stream.captions.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncCaptions: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: caption = await async_client.stream.captions.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.stream.captions.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_downloads.py b/tests/api_resources/stream/test_downloads.py index 2940e0ff0d6..94e6dd14371 100644 --- a/tests/api_resources/stream/test_downloads.py +++ b/tests/api_resources/stream/test_downloads.py @@ -24,7 +24,7 @@ class TestDownloads: @parametrize def test_method_create(self, client: Cloudflare) -> None: download = client.stream.downloads.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -46,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -62,14 +62,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.downloads.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: download = client.stream.downloads.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) @@ -85,7 +85,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -97,7 +97,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -112,20 +112,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.downloads.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: download = client.stream.downloads.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) @@ -133,7 +133,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -145,7 +145,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -160,13 +160,13 @@ 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.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.downloads.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -177,7 +177,7 @@ class TestAsyncDownloads: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -186,7 +186,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -199,7 +199,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -215,14 +215,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.downloads.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -230,7 +230,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) @@ -238,7 +238,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -250,7 +250,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -265,20 +265,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.downloads.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) @@ -286,7 +286,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -298,7 +298,7 @@ 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.stream.downloads.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -313,12 +313,12 @@ 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.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.downloads.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_embed.py b/tests/api_resources/stream/test_embed.py index 1f7066ff514..1019efe5e4c 100644 --- a/tests/api_resources/stream/test_embed.py +++ b/tests/api_resources/stream/test_embed.py @@ -19,7 +19,7 @@ class TestEmbed: @parametrize def test_method_get(self, client: Cloudflare) -> None: embed = client.stream.embed.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, embed, path=["response"]) @@ -27,7 +27,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -39,7 +39,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.embed.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -54,13 +54,13 @@ 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.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.embed.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -71,7 +71,7 @@ class TestAsyncEmbed: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: embed = await async_client.stream.embed.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, embed, path=["response"]) @@ -79,7 +79,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -91,7 +91,7 @@ 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.stream.embed.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -106,12 +106,12 @@ 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.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.embed.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_keys.py b/tests/api_resources/stream/test_keys.py index 14b7d11cef2..feb60741e82 100644 --- a/tests/api_resources/stream/test_keys.py +++ b/tests/api_resources/stream/test_keys.py @@ -62,7 +62,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.stream.keys.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) @@ -70,7 +70,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -82,7 +82,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.keys.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -97,13 +97,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.keys.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -194,7 +194,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.stream.keys.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) @@ -202,7 +202,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -214,7 +214,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.keys.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -229,13 +229,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.keys.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_live_inputs.py b/tests/api_resources/stream/test_live_inputs.py index 2e2f8f3e4d1..c34ea9ecd6f 100644 --- a/tests/api_resources/stream/test_live_inputs.py +++ b/tests/api_resources/stream/test_live_inputs.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -85,9 +85,9 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -102,7 +102,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -114,7 +114,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -129,13 +129,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.with_raw_response.update( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -188,7 +188,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert live_input is None @@ -196,7 +196,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -208,7 +208,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -223,20 +223,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.with_raw_response.delete( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -244,7 +244,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -256,7 +256,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -271,13 +271,13 @@ 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.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.with_raw_response.get( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -296,7 +296,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -342,7 +342,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -350,9 +350,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -367,7 +367,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -379,7 +379,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -394,13 +394,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.with_raw_response.update( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -453,7 +453,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert live_input is None @@ -461,7 +461,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -473,7 +473,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -488,20 +488,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.with_raw_response.delete( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -509,7 +509,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -521,7 +521,7 @@ 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.stream.live_inputs.with_streaming_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -536,12 +536,12 @@ 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.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.with_raw_response.get( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_token.py b/tests/api_resources/stream/test_token.py index 0d94826e27c..723546ff70c 100644 --- a/tests/api_resources/stream/test_token.py +++ b/tests/api_resources/stream/test_token.py @@ -20,7 +20,7 @@ class TestToken: @parametrize def test_method_create(self, client: Cloudflare) -> None: token = client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: token = client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="ab0d4ef71g4425f8dcba9041231813000", access_rules=[ @@ -61,7 +61,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -73,7 +73,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.token.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -88,13 +88,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.token.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -105,7 +105,7 @@ class TestAsyncToken: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: token = await async_client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) @@ -113,7 +113,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="ab0d4ef71g4425f8dcba9041231813000", access_rules=[ @@ -146,7 +146,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.token.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -173,12 +173,12 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.token.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py index 78838fa8e9a..911dd1d6ad7 100644 --- a/tests/api_resources/stream/test_watermarks.py +++ b/tests/api_resources/stream/test_watermarks.py @@ -119,7 +119,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) @@ -127,7 +127,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -154,20 +154,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.watermarks.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) @@ -175,7 +175,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -202,13 +202,13 @@ 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.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.watermarks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -317,7 +317,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) @@ -325,7 +325,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -337,7 +337,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.watermarks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -352,20 +352,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.watermarks.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) @@ -373,7 +373,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -385,7 +385,7 @@ 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.stream.watermarks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -400,12 +400,12 @@ 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.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.watermarks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 53f68ccb9e1..fca546cad37 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -31,7 +31,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: account_id={}, name="Demo Account", settings={ - "abuse_contact_email": "string", + "abuse_contact_email": "abuse_contact_email", "default_nameservers": "cloudflare.standard", "enforce_twofactor": True, "use_account_custom_ns_by_default": True, @@ -149,7 +149,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare account_id={}, name="Demo Account", settings={ - "abuse_contact_email": "string", + "abuse_contact_email": "abuse_contact_email", "default_nameservers": "cloudflare.standard", "enforce_twofactor": True, "use_account_custom_ns_by_default": True, diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py index 00e3af8c65d..8ab7ec39b18 100644 --- a/tests/api_resources/test_ai_gateway.py +++ b/tests/api_resources/test_ai_gateway.py @@ -93,7 +93,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -107,7 +107,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -125,7 +125,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -146,7 +146,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="", cache_invalidate_on_update=True, cache_ttl=0, @@ -158,7 +158,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.update( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -180,7 +180,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", - order_by="string", + order_by="order_by", page=1, per_page=5, ) @@ -220,7 +220,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -228,7 +228,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -240,7 +240,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -255,20 +255,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.delete( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -276,7 +276,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -288,7 +288,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -303,13 +303,13 @@ 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.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.get( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -386,7 +386,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -400,7 +400,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -418,7 +418,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -439,7 +439,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="", cache_invalidate_on_update=True, cache_ttl=0, @@ -451,7 +451,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.update( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -473,7 +473,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ai_gateway = await async_client.ai_gateway.list( account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", - order_by="string", + order_by="order_by", page=1, per_page=5, ) @@ -513,7 +513,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -521,7 +521,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -533,7 +533,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -548,20 +548,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.delete( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -569,7 +569,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -581,7 +581,7 @@ 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.with_streaming_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -596,12 +596,12 @@ 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.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.get( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index 31b53da9ac7..0b9e116d432 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -77,7 +77,7 @@ def test_method_url_info(self, client: Cloudflare) -> None: def test_method_url_info_with_all_params(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", - url="string", + url="url", url_id_param={"url_id": 0}, ) assert_matches_type(Optional[Info], brand_protection, path=["response"]) @@ -174,7 +174,7 @@ async def test_method_url_info(self, async_client: AsyncCloudflare) -> None: async def test_method_url_info_with_all_params(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", - url="string", + url="url", url_id_param={"url_id": 0}, ) assert_matches_type(Optional[Info], brand_protection, path=["response"]) diff --git a/tests/api_resources/test_cache.py b/tests/api_resources/test_cache.py index d23c8672439..7af5c5be461 100644 --- a/tests/api_resources/test_cache.py +++ b/tests/api_resources/test_cache.py @@ -20,14 +20,14 @@ class TestCache: @parametrize def test_method_purge_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", tags=["a-cache-tag", "another-cache-tag"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -35,7 +35,7 @@ def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_1(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,14 +66,14 @@ def test_path_params_purge_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", hosts=["www.example.com", "images.example.com"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -81,7 +81,7 @@ def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_2(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,14 +112,14 @@ def test_path_params_purge_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", prefixes=["www.example.com/foo", "images.example.com/bar/baz"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -127,7 +127,7 @@ def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -138,7 +138,7 @@ def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_3(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -158,14 +158,14 @@ def test_path_params_purge_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", purge_everything=True, ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -173,7 +173,7 @@ def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -184,7 +184,7 @@ def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_4(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,14 +204,14 @@ def test_path_params_purge_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -219,7 +219,7 @@ def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -230,7 +230,7 @@ def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_5(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,14 +250,14 @@ def test_path_params_purge_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_6(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", files=[ { "headers": { @@ -282,7 +282,7 @@ def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -293,7 +293,7 @@ def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_6(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -317,14 +317,14 @@ class TestAsyncCache: @parametrize async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", tags=["a-cache-tag", "another-cache-tag"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -332,7 +332,7 @@ async def test_method_purge_with_all_params_overload_1(self, async_client: Async @parametrize async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -343,7 +343,7 @@ async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -363,14 +363,14 @@ async def test_path_params_purge_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", hosts=["www.example.com", "images.example.com"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -378,7 +378,7 @@ async def test_method_purge_with_all_params_overload_2(self, async_client: Async @parametrize async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -389,7 +389,7 @@ async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -409,14 +409,14 @@ async def test_path_params_purge_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", prefixes=["www.example.com/foo", "images.example.com/bar/baz"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -424,7 +424,7 @@ async def test_method_purge_with_all_params_overload_3(self, async_client: Async @parametrize async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -435,7 +435,7 @@ async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -455,14 +455,14 @@ async def test_path_params_purge_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", purge_everything=True, ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -470,7 +470,7 @@ async def test_method_purge_with_all_params_overload_4(self, async_client: Async @parametrize async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -481,7 +481,7 @@ async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,14 +501,14 @@ async def test_path_params_purge_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -516,7 +516,7 @@ async def test_method_purge_with_all_params_overload_5(self, async_client: Async @parametrize async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -527,7 +527,7 @@ async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -547,14 +547,14 @@ async def test_path_params_purge_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_6(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", files=[ { "headers": { @@ -579,7 +579,7 @@ async def test_method_purge_with_all_params_overload_6(self, async_client: Async @parametrize async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -590,7 +590,7 @@ async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_calls.py b/tests/api_resources/test_calls.py index a518aded095..29330b4e86e 100644 --- a/tests/api_resources/test_calls.py +++ b/tests/api_resources/test_calls.py @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: call = client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -79,7 +79,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: call = client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) @@ -88,7 +88,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -115,13 +115,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.calls.with_raw_response.update( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -166,7 +166,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: call = client.calls.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -174,7 +174,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -186,7 +186,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -201,20 +201,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.calls.with_raw_response.delete( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: call = client.calls.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -222,7 +222,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -234,7 +234,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -249,13 +249,13 @@ 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.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.calls.with_raw_response.get( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,7 +312,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -320,7 +320,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) @@ -329,7 +329,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -341,7 +341,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -356,13 +356,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.calls.with_raw_response.update( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -407,7 +407,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -415,7 +415,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -427,7 +427,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -442,20 +442,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.calls.with_raw_response.delete( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -463,7 +463,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -475,7 +475,7 @@ 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.calls.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -490,12 +490,12 @@ 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.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.calls.with_raw_response.get( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_client_certificates.py b/tests/api_resources/test_client_certificates.py index 8f8328f80e7..b76f1f75951 100644 --- a/tests/api_resources/test_client_certificates.py +++ b/tests/api_resources/test_client_certificates.py @@ -119,7 +119,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -127,7 +127,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -154,20 +154,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): client.client_certificates.with_raw_response.delete( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -175,7 +175,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -202,20 +202,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): client.client_certificates.with_raw_response.edit( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -223,7 +223,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -235,7 +235,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -250,13 +250,13 @@ 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 `zone_id` but received ''"): client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): client.client_certificates.with_raw_response.get( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -363,7 +363,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -371,7 +371,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -383,7 +383,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -398,20 +398,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): await async_client.client_certificates.with_raw_response.delete( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -419,7 +419,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -431,7 +431,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -446,20 +446,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): await async_client.client_certificates.with_raw_response.edit( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -467,7 +467,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -479,7 +479,7 @@ 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.client_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -494,12 +494,12 @@ 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 `zone_id` but received ''"): await async_client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): await async_client.client_certificates.with_raw_response.get( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py index 3612c9a1544..e0e754e6cf8 100644 --- a/tests/api_resources/test_custom_certificates.py +++ b/tests/api_resources/test_custom_certificates.py @@ -135,7 +135,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) @@ -143,7 +143,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -155,7 +155,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -170,20 +170,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): client.custom_certificates.with_raw_response.delete( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) @@ -191,7 +191,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", bundle_method="ubiquitous", certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", @@ -204,7 +204,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -231,20 +231,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): client.custom_certificates.with_raw_response.edit( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) @@ -252,7 +252,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -264,7 +264,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -279,13 +279,13 @@ 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 `zone_id` but received ''"): client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): client.custom_certificates.with_raw_response.get( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -404,7 +404,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) @@ -412,7 +412,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -424,7 +424,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -439,20 +439,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): await async_client.custom_certificates.with_raw_response.delete( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", bundle_method="ubiquitous", certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", @@ -473,7 +473,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -485,7 +485,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -500,20 +500,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): await async_client.custom_certificates.with_raw_response.edit( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) @@ -521,7 +521,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -533,7 +533,7 @@ 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.custom_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -548,12 +548,12 @@ 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 `zone_id` but received ''"): await async_client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): await async_client.custom_certificates.with_raw_response.get( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_custom_hostnames.py b/tests/api_resources/test_custom_hostnames.py index 1ca4d8d7318..b749c8eacae 100644 --- a/tests/api_resources/test_custom_hostnames.py +++ b/tests/api_resources/test_custom_hostnames.py @@ -152,7 +152,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) @@ -160,7 +160,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -172,7 +172,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -187,20 +187,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): client.custom_hostnames.with_raw_response.delete( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) @@ -208,7 +208,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", custom_metadata={"key": "value"}, custom_origin_server="origin2.example.com", @@ -235,7 +235,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -247,7 +247,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -262,20 +262,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): client.custom_hostnames.with_raw_response.edit( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) @@ -283,7 +283,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -295,7 +295,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -310,13 +310,13 @@ 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 `zone_id` but received ''"): client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): client.custom_hostnames.with_raw_response.get( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -452,7 +452,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -472,7 +472,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -487,20 +487,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): await async_client.custom_hostnames.with_raw_response.delete( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) @@ -508,7 +508,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", custom_metadata={"key": "value"}, custom_origin_server="origin2.example.com", @@ -535,7 +535,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -547,7 +547,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -562,20 +562,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): await async_client.custom_hostnames.with_raw_response.edit( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) @@ -583,7 +583,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -595,7 +595,7 @@ 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.custom_hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -610,12 +610,12 @@ 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 `zone_id` but received ''"): await async_client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): await async_client.custom_hostnames.with_raw_response.get( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_custom_nameservers.py b/tests/api_resources/test_custom_nameservers.py index a0ed2167a7d..e64edbc4327 100644 --- a/tests/api_resources/test_custom_nameservers.py +++ b/tests/api_resources/test_custom_nameservers.py @@ -76,7 +76,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_nameserver = client.custom_nameservers.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) @@ -84,7 +84,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) @@ -96,7 +96,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_nameservers.with_streaming_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) as response: assert not response.is_closed @@ -111,13 +111,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_ns_id` but received ''"): client.custom_nameservers.with_raw_response.delete( - "", + custom_ns_id="", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) @@ -255,7 +255,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.custom_nameservers.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) @@ -263,7 +263,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) @@ -275,7 +275,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_nameservers.with_streaming_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) as response: assert not response.is_closed @@ -290,13 +290,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_ns_id` but received ''"): await async_client.custom_nameservers.with_raw_response.delete( - "", + custom_ns_id="", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) diff --git a/tests/api_resources/test_email_routing.py b/tests/api_resources/test_email_routing.py index e31f84ff008..3aafbd93e2d 100644 --- a/tests/api_resources/test_email_routing.py +++ b/tests/api_resources/test_email_routing.py @@ -20,7 +20,7 @@ class TestEmailRouting: @parametrize def test_method_disable(self, client: Cloudflare) -> None: email_routing = client.email_routing.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -28,7 +28,7 @@ def test_method_disable(self, client: Cloudflare) -> None: @parametrize def test_raw_response_disable(self, client: Cloudflare) -> None: response = client.email_routing.with_raw_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -40,7 +40,7 @@ def test_raw_response_disable(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_disable(self, client: Cloudflare) -> None: with client.email_routing.with_streaming_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -55,14 +55,14 @@ def test_streaming_response_disable(self, client: Cloudflare) -> None: def test_path_params_disable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.with_raw_response.disable( - "", + zone_identifier="", body={}, ) @parametrize def test_method_enable(self, client: Cloudflare) -> None: email_routing = client.email_routing.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -70,7 +70,7 @@ def test_method_enable(self, client: Cloudflare) -> None: @parametrize def test_raw_response_enable(self, client: Cloudflare) -> None: response = client.email_routing.with_raw_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -82,7 +82,7 @@ def test_raw_response_enable(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_enable(self, client: Cloudflare) -> None: with client.email_routing.with_streaming_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -97,7 +97,7 @@ def test_streaming_response_enable(self, client: Cloudflare) -> None: def test_path_params_enable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.with_raw_response.enable( - "", + zone_identifier="", body={}, ) @@ -146,7 +146,7 @@ class TestAsyncEmailRouting: @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: email_routing = await async_client.email_routing.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -154,7 +154,7 @@ async def test_method_disable(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.with_raw_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -166,7 +166,7 @@ async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None @parametrize async def test_streaming_response_disable(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.with_streaming_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -181,14 +181,14 @@ async def test_streaming_response_disable(self, async_client: AsyncCloudflare) - async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.with_raw_response.disable( - "", + zone_identifier="", body={}, ) @parametrize async def test_method_enable(self, async_client: AsyncCloudflare) -> None: email_routing = await async_client.email_routing.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -196,7 +196,7 @@ async def test_method_enable(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.with_raw_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -208,7 +208,7 @@ async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.with_streaming_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -223,7 +223,7 @@ async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.with_raw_response.enable( - "", + zone_identifier="", body={}, ) diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py index 58215dc774b..c088a4f8f9a 100644 --- a/tests/api_resources/test_filters.py +++ b/tests/api_resources/test_filters.py @@ -28,7 +28,7 @@ class TestFilters: def test_method_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -39,7 +39,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -70,7 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -79,7 +79,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -91,7 +91,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -106,7 +106,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -124,14 +124,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.filters.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -140,7 +140,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @@ -149,7 +149,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b61", description="browsers", expression="php", @@ -165,7 +165,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -177,7 +177,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,14 +192,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -222,7 +222,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.filters.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -262,7 +262,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -275,7 +275,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -291,13 +291,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.filters.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -310,7 +310,7 @@ class TestAsyncFilters: async def test_method_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -321,7 +321,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -335,7 +335,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -352,7 +352,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -361,7 +361,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -373,7 +373,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -388,7 +388,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -406,14 +406,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.filters.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -422,7 +422,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @@ -431,7 +431,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b61", description="browsers", expression="php", @@ -447,7 +447,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -459,7 +459,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -474,14 +474,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -491,7 +491,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -504,7 +504,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -520,13 +520,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.filters.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -534,7 +534,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -544,7 +544,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -557,7 +557,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -573,12 +573,12 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.filters.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py index c01a5247d8b..59a3c637620 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -105,7 +105,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -115,7 +115,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -151,7 +151,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -165,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -182,7 +182,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -190,7 +190,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.update( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -246,7 +246,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) @@ -254,7 +254,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -266,7 +266,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -281,20 +281,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -304,7 +304,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -340,7 +340,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -354,7 +354,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -371,7 +371,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -379,7 +379,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.edit( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -388,7 +388,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) @@ -396,7 +396,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -408,7 +408,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -423,13 +423,13 @@ 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 `zone_id` but received ''"): client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -521,7 +521,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -531,7 +531,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -567,7 +567,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -581,7 +581,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -598,7 +598,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -606,7 +606,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.update( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -662,7 +662,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) @@ -670,7 +670,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -682,7 +682,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -697,20 +697,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -720,7 +720,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -756,7 +756,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -770,7 +770,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -787,7 +787,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -795,7 +795,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.edit( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -804,7 +804,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) @@ -812,7 +812,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -824,7 +824,7 @@ 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.healthchecks.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -839,12 +839,12 @@ 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 `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_ips.py b/tests/api_resources/test_ips.py index 165880daa49..e013f501f77 100644 --- a/tests/api_resources/test_ips.py +++ b/tests/api_resources/test_ips.py @@ -25,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ip = client.ips.list( - networks="string", + networks="networks", ) assert_matches_type(Optional[IPListResponse], ip, path=["response"]) @@ -61,7 +61,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.ips.list( - networks="string", + networks="networks", ) assert_matches_type(Optional[IPListResponse], ip, path=["response"]) diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py index f1859888ebc..0dae2518fe2 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -128,7 +128,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) @@ -136,7 +136,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -148,7 +148,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -163,7 +163,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -171,14 +171,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): client.keyless_certificates.with_raw_response.delete( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -186,7 +186,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=False, host="example.com", @@ -202,7 +202,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -214,7 +214,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -229,7 +229,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -237,14 +237,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): client.keyless_certificates.with_raw_response.edit( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -252,7 +252,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -264,7 +264,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -279,7 +279,7 @@ 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 `zone_id` but received ''"): client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -287,7 +287,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): client.keyless_certificates.with_raw_response.get( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -402,7 +402,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) @@ -410,7 +410,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -422,7 +422,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -437,7 +437,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -445,14 +445,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): await async_client.keyless_certificates.with_raw_response.delete( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=False, host="example.com", @@ -476,7 +476,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -488,7 +488,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -503,7 +503,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -511,14 +511,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): await async_client.keyless_certificates.with_raw_response.edit( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -526,7 +526,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -538,7 +538,7 @@ 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.keyless_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -553,7 +553,7 @@ 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 `zone_id` but received ''"): await async_client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -561,6 +561,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): await async_client.keyless_certificates.with_raw_response.get( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_load_balancers.py b/tests/api_resources/test_load_balancers.py index bf36879da54..915976705c6 100644 --- a/tests/api_resources/test_load_balancers.py +++ b/tests/api_resources/test_load_balancers.py @@ -319,7 +319,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -334,7 +334,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -565,7 +565,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -584,7 +584,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -606,7 +606,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -619,7 +619,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.update( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -671,7 +671,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) @@ -679,7 +679,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -691,7 +691,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -706,20 +706,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.delete( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -727,7 +727,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", adaptive_routing={"failover_across_pools": True}, country_pools={ @@ -958,7 +958,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -970,7 +970,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -985,20 +985,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.edit( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -1006,7 +1006,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1018,7 +1018,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -1033,13 +1033,13 @@ 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 `zone_id` but received ''"): client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.get( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1345,7 +1345,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1360,7 +1360,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1591,7 +1591,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1610,7 +1610,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1632,7 +1632,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1645,7 +1645,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.update( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1697,7 +1697,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) @@ -1705,7 +1705,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1717,7 +1717,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -1732,20 +1732,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.delete( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -1753,7 +1753,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", adaptive_routing={"failover_across_pools": True}, country_pools={ @@ -1984,7 +1984,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1996,7 +1996,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -2011,20 +2011,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.edit( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -2032,7 +2032,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -2044,7 +2044,7 @@ 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.load_balancers.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -2059,12 +2059,12 @@ 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 `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.get( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/test_memberships.py b/tests/api_resources/test_memberships.py index cb5e1358a4c..7d30c588011 100644 --- a/tests/api_resources/test_memberships.py +++ b/tests/api_resources/test_memberships.py @@ -26,7 +26,7 @@ class TestMemberships: @parametrize def test_method_update(self, client: Cloudflare) -> None: membership = client.memberships.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) assert_matches_type(Optional[MembershipUpdateResponse], membership, path=["response"]) @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.memberships.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) @@ -46,7 +46,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.memberships.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) as response: assert not response.is_closed @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): client.memberships.with_raw_response.update( - "", + membership_id="", status="accepted", ) @@ -186,7 +186,7 @@ class TestAsyncMemberships: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: membership = await async_client.memberships.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) assert_matches_type(Optional[MembershipUpdateResponse], membership, path=["response"]) @@ -194,7 +194,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.memberships.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) @@ -206,7 +206,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.memberships.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) as response: assert not response.is_closed @@ -221,7 +221,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): await async_client.memberships.with_raw_response.update( - "", + membership_id="", status="accepted", ) diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py index 70101b484c8..666b1c3c621 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -119,7 +119,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -127,7 +127,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -154,20 +154,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): client.mtls_certificates.with_raw_response.delete( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -175,7 +175,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -202,13 +202,13 @@ 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.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): client.mtls_certificates.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -314,7 +314,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -322,7 +322,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -334,7 +334,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -349,20 +349,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): await async_client.mtls_certificates.with_raw_response.delete( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -370,7 +370,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -382,7 +382,7 @@ 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.mtls_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -397,12 +397,12 @@ 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.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): await async_client.mtls_certificates.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_origin_tls_client_auth.py b/tests/api_resources/test_origin_tls_client_auth.py index cd43e2ee233..53fa7d4c873 100644 --- a/tests/api_resources/test_origin_tls_client_auth.py +++ b/tests/api_resources/test_origin_tls_client_auth.py @@ -110,7 +110,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -145,20 +145,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) @@ -166,7 +166,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -178,7 +178,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ 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 `zone_id` but received ''"): client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -294,7 +294,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) @@ -302,7 +302,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -314,7 +314,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -329,20 +329,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) @@ -350,7 +350,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ 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.origin_tls_client_auth.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -377,12 +377,12 @@ 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 `zone_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_pagerules.py b/tests/api_resources/test_pagerules.py index 3a54b5d879f..602cbd4d6f6 100644 --- a/tests/api_resources/test_pagerules.py +++ b/tests/api_resources/test_pagerules.py @@ -156,7 +156,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -176,7 +176,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_method_update_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -220,7 +220,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -243,7 +243,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -269,7 +269,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", actions=[{}, {}, {}], targets=[ @@ -285,7 +285,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.update( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -359,7 +359,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -369,7 +369,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -382,7 +382,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -398,13 +398,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.delete( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -422,7 +422,7 @@ def test_method_edit(self, client: Cloudflare) -> None: def test_method_edit_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -466,7 +466,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -479,7 +479,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: def test_streaming_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -495,13 +495,13 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.edit( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -509,7 +509,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -519,7 +519,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -532,7 +532,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -548,13 +548,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.get( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -692,7 +692,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -712,7 +712,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -756,7 +756,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -779,7 +779,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -805,7 +805,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", actions=[{}, {}, {}], targets=[ @@ -821,7 +821,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.update( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -895,7 +895,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -905,7 +905,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -918,7 +918,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -934,13 +934,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.delete( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -948,7 +948,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -958,7 +958,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1002,7 +1002,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1015,7 +1015,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1031,13 +1031,13 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.edit( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1045,7 +1045,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1055,7 +1055,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1068,7 +1068,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1084,12 +1084,12 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.get( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_pcaps.py b/tests/api_resources/test_pcaps.py index c290dfd9e3e..43798f1c52d 100644 --- a/tests/api_resources/test_pcaps.py +++ b/tests/api_resources/test_pcaps.py @@ -210,7 +210,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: pcap = client.pcaps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PCAPGetResponse, pcap, path=["response"]) @@ -218,7 +218,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -230,7 +230,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pcaps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -245,13 +245,13 @@ 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.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): client.pcaps.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -451,7 +451,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PCAPGetResponse, pcap, path=["response"]) @@ -459,7 +459,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -471,7 +471,7 @@ 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.pcaps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -486,12 +486,12 @@ 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.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): await async_client.pcaps.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 46cabad8fde..8a3ef3ee191 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: plan = client.plans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AvailableRatePlan, plan, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.plans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -94,13 +94,13 @@ 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 `zone_identifier` but received ''"): client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_identifier` but received ''"): client.plans.with_raw_response.get( - "", + plan_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: plan = await async_client.plans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AvailableRatePlan, plan, path=["response"]) @@ -157,7 +157,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -169,7 +169,7 @@ 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.plans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -184,12 +184,12 @@ 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 `zone_identifier` but received ''"): await async_client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_identifier` but received ''"): await async_client.plans.with_raw_response.get( - "", + plan_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_queues.py b/tests/api_resources/test_queues.py index 4cb9c1c38c2..87752b02448 100644 --- a/tests/api_resources/test_queues.py +++ b/tests/api_resources/test_queues.py @@ -68,7 +68,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: queue = client.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -77,7 +77,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -90,7 +90,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) as response: @@ -106,14 +106,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={"queue_name": "renamed-example-queue"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -159,7 +159,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: queue = client.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) @@ -167,7 +167,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -179,7 +179,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -194,20 +194,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: queue = client.queues.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Queue], queue, path=["response"]) @@ -215,7 +215,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -227,7 +227,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -242,13 +242,13 @@ 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.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -301,7 +301,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -310,7 +310,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -323,7 +323,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) as response: @@ -339,14 +339,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={"queue_name": "renamed-example-queue"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -427,20 +427,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Queue], queue, path=["response"]) @@ -448,7 +448,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -460,7 +460,7 @@ 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.queues.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -475,12 +475,12 @@ 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.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_rate_limits.py b/tests/api_resources/test_rate_limits.py index f03e02cb30c..0fd1a584ca0 100644 --- a/tests/api_resources/test_rate_limits.py +++ b/tests/api_resources/test_rate_limits.py @@ -31,7 +31,7 @@ class TestRateLimits: def test_method_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) @@ -90,7 +90,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=1, ) @@ -101,7 +101,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -113,7 +113,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,14 +128,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -145,7 +145,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -174,13 +174,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.rate_limits.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -201,7 +201,7 @@ def test_method_edit(self, client: Cloudflare) -> None: def test_raw_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -216,7 +216,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: def test_streaming_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -234,14 +234,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.rate_limits.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -250,7 +250,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -273,7 +273,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -289,13 +289,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.rate_limits.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -308,7 +308,7 @@ class TestAsyncRateLimits: async def test_method_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -319,7 +319,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -333,7 +333,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -350,7 +350,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -358,7 +358,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) @@ -367,7 +367,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=1, ) @@ -378,7 +378,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -390,7 +390,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -405,14 +405,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -422,7 +422,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -435,7 +435,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -451,13 +451,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.rate_limits.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -466,7 +466,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -478,7 +478,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -493,7 +493,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -511,14 +511,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.rate_limits.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -527,7 +527,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -537,7 +537,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -550,7 +550,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -566,12 +566,12 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.rate_limits.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index 97d3d27207e..d8877f10ca1 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -92,7 +92,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -105,7 +105,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -149,16 +149,16 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: ruleset = client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) @@ -166,7 +166,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[ { "action": "block", @@ -217,7 +217,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -229,9 +229,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -243,9 +243,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -260,30 +260,30 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.with_raw_response.update( - "", + ruleset_id="", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -291,7 +291,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -299,7 +299,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -311,7 +311,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -331,15 +331,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -347,8 +347,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -356,8 +356,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -369,8 +369,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -385,28 +385,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.with_raw_response.delete( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -414,8 +414,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -423,8 +423,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -436,8 +436,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -452,20 +452,20 @@ 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 `ruleset_id` but received ''"): client.rulesets.with_raw_response.get( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @@ -480,7 +480,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -541,7 +541,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -554,7 +554,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -570,7 +570,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -598,16 +598,16 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) @@ -615,7 +615,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[ { "action": "block", @@ -666,7 +666,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -678,9 +678,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -692,9 +692,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -709,30 +709,30 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.update( - "", + ruleset_id="", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -740,7 +740,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -748,7 +748,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -760,7 +760,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -780,15 +780,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -796,8 +796,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -805,8 +805,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -818,8 +818,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -834,28 +834,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.delete( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -863,8 +863,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -872,8 +872,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -885,8 +885,8 @@ 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.rulesets.with_streaming_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -901,18 +901,18 @@ 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 `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.get( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py index cad43decc6a..25af699eda9 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -22,7 +22,7 @@ class TestSnippets: @parametrize def test_method_update(self, client: Cloudflare) -> None: snippet = client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -31,7 +31,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: snippet = client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, @@ -42,7 +42,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -55,7 +55,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -71,13 +71,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.update( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -122,7 +122,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: snippet = client.snippets.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) @@ -130,7 +130,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -142,7 +142,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -157,20 +157,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.delete( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: snippet = client.snippets.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -178,7 +178,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -190,7 +190,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -205,13 +205,13 @@ 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 `zone_id` but received ''"): client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ class TestAsyncSnippets: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -232,7 +232,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, @@ -243,7 +243,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -256,7 +256,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -272,13 +272,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.update( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -323,7 +323,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) @@ -331,7 +331,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -343,7 +343,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -358,20 +358,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.delete( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -379,7 +379,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -391,7 +391,7 @@ 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.snippets.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -406,12 +406,12 @@ 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 `zone_id` but received ''"): await async_client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py index 5bab50b63ce..56ed1c0d953 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -142,7 +142,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: stream = client.stream.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert stream is None @@ -150,7 +150,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -162,7 +162,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -177,20 +177,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: stream = client.stream.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Video], stream, path=["response"]) @@ -198,7 +198,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -210,7 +210,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -225,13 +225,13 @@ 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.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert stream is None @@ -370,7 +370,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -382,7 +382,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -397,20 +397,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Video], stream, path=["response"]) @@ -418,7 +418,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -430,7 +430,7 @@ 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.stream.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -445,12 +445,12 @@ 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.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 7f4f56f32cf..e756ce625ff 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -27,15 +27,15 @@ class TestSubscriptions: @parametrize def test_method_create(self, client: Cloudflare) -> None: subscription = client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: subscription = client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -73,7 +73,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,13 +98,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: subscription = client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @@ -112,9 +112,9 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: subscription = client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - app={"install_id": "string"}, + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -152,7 +152,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -164,7 +164,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -179,7 +179,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -187,7 +187,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): client.subscriptions.with_raw_response.update( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -232,7 +232,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: subscription = client.subscriptions.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) @@ -240,7 +240,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,7 +267,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -275,7 +275,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): client.subscriptions.with_raw_response.delete( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -324,15 +324,15 @@ class TestAsyncSubscriptions: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -370,7 +370,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -381,7 +381,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -395,13 +395,13 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @@ -409,9 +409,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - app={"install_id": "string"}, + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -449,7 +449,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -461,7 +461,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -476,7 +476,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -484,7 +484,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): await async_client.subscriptions.with_raw_response.update( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -529,7 +529,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) @@ -537,7 +537,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -549,7 +549,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -564,7 +564,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -572,7 +572,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): await async_client.subscriptions.with_raw_response.delete( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_url_scanner.py b/tests/api_resources/test_url_scanner.py index 99393bd91ce..452d2b50df3 100644 --- a/tests/api_resources/test_url_scanner.py +++ b/tests/api_resources/test_url_scanner.py @@ -21,28 +21,29 @@ class TestURLScanner: @parametrize def test_method_scan(self, client: Cloudflare) -> None: url_scanner = client.url_scanner.scan( - "string", + account_id="accountId", ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) @parametrize def test_method_scan_with_all_params(self, client: Cloudflare) -> None: url_scanner = client.url_scanner.scan( - "string", + account_id="accountId", account_scans=True, asn="13335", date_end=parse_datetime("2019-12-27T18:11:19.117Z"), date_start=parse_datetime("2019-12-27T18:11:19.117Z"), + hash="hash", hostname="example.com", ip="1.1.1.1", is_malicious=True, limit=100, - next_cursor="string", - page_asn="string", - page_hostname="string", - page_ip="string", - page_path="string", - page_url="string", + next_cursor="next_cursor", + page_asn="page_asn", + page_hostname="page_hostname", + page_ip="page_ip", + page_path="page_path", + page_url="page_url", path="/samples/subresource-integrity/", scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", url="https://example.com/?hello", @@ -52,7 +53,7 @@ def test_method_scan_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_scan(self, client: Cloudflare) -> None: response = client.url_scanner.with_raw_response.scan( - "string", + account_id="accountId", ) assert response.is_closed is True @@ -63,7 +64,7 @@ def test_raw_response_scan(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_scan(self, client: Cloudflare) -> None: with client.url_scanner.with_streaming_response.scan( - "string", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -77,7 +78,7 @@ def test_streaming_response_scan(self, client: Cloudflare) -> None: def test_path_params_scan(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.with_raw_response.scan( - "", + account_id="", ) @@ -87,28 +88,29 @@ class TestAsyncURLScanner: @parametrize async def test_method_scan(self, async_client: AsyncCloudflare) -> None: url_scanner = await async_client.url_scanner.scan( - "string", + account_id="accountId", ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) @parametrize async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare) -> None: url_scanner = await async_client.url_scanner.scan( - "string", + account_id="accountId", account_scans=True, asn="13335", date_end=parse_datetime("2019-12-27T18:11:19.117Z"), date_start=parse_datetime("2019-12-27T18:11:19.117Z"), + hash="hash", hostname="example.com", ip="1.1.1.1", is_malicious=True, limit=100, - next_cursor="string", - page_asn="string", - page_hostname="string", - page_ip="string", - page_path="string", - page_url="string", + next_cursor="next_cursor", + page_asn="page_asn", + page_hostname="page_hostname", + page_ip="page_ip", + page_path="page_path", + page_url="page_url", path="/samples/subresource-integrity/", scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", url="https://example.com/?hello", @@ -118,7 +120,7 @@ async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.with_raw_response.scan( - "string", + account_id="accountId", ) assert response.is_closed is True @@ -129,7 +131,7 @@ async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.with_streaming_response.scan( - "string", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,5 +145,5 @@ async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> N async def test_path_params_scan(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.with_raw_response.scan( - "", + account_id="", ) diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py index 9eb37b948c4..14af34401f7 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -119,7 +119,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -131,7 +131,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -173,7 +173,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -189,7 +189,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -208,7 +208,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -218,7 +218,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -276,7 +276,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) @@ -284,7 +284,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -296,7 +296,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -311,20 +311,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.delete( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -336,7 +336,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -378,7 +378,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -394,7 +394,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -413,7 +413,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -423,7 +423,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.edit( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -434,7 +434,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @@ -442,7 +442,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,13 +469,13 @@ 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 `zone_id` but received ''"): client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -581,7 +581,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -593,7 +593,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -635,7 +635,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -651,7 +651,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -670,7 +670,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -680,7 +680,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -738,7 +738,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) @@ -746,7 +746,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -758,7 +758,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -773,20 +773,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.delete( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -798,7 +798,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -840,7 +840,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -856,7 +856,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -875,7 +875,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -885,7 +885,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.edit( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -896,7 +896,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @@ -904,7 +904,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -916,7 +916,7 @@ 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.waiting_rooms.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -931,12 +931,12 @@ 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 `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_warp_connector.py b/tests/api_resources/test_warp_connector.py index 7db50a0d321..77d3b889c82 100644 --- a/tests/api_resources/test_warp_connector.py +++ b/tests/api_resources/test_warp_connector.py @@ -127,7 +127,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) @@ -135,7 +135,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -147,7 +147,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -162,20 +162,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) @@ -183,7 +183,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -193,7 +193,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -205,7 +205,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -220,20 +220,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) @@ -241,7 +241,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -253,7 +253,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -268,20 +268,20 @@ 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.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_token(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) @@ -289,7 +289,7 @@ def test_method_token(self, client: Cloudflare) -> None: @parametrize def test_raw_response_token(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -301,7 +301,7 @@ def test_raw_response_token(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_token(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -316,13 +316,13 @@ def test_streaming_response_token(self, client: Cloudflare) -> None: def test_path_params_token(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.token( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -433,7 +433,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) @@ -441,7 +441,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -453,7 +453,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -468,20 +468,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) @@ -489,7 +489,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -499,7 +499,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -511,7 +511,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -526,20 +526,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) @@ -547,7 +547,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -559,7 +559,7 @@ 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.warp_connector.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -574,20 +574,20 @@ 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.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_token(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) @@ -595,7 +595,7 @@ async def test_method_token(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_token(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -607,7 +607,7 @@ async def test_raw_response_token(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_token(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -622,12 +622,12 @@ async def test_streaming_response_token(self, async_client: AsyncCloudflare) -> async def test_path_params_token(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.token( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/test_zones.py b/tests/api_resources/test_zones.py index f4a3a4dfb67..c66ce174c90 100644 --- a/tests/api_resources/test_zones.py +++ b/tests/api_resources/test_zones.py @@ -73,12 +73,12 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: zone = client.zones.list( account={ - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, direction="desc", match="any", - name="string", + name="name", order="status", page=1, per_page=5, @@ -290,12 +290,12 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.list( account={ - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, direction="desc", match="any", - name="string", + name="name", order="status", page=1, per_page=5, diff --git a/tests/api_resources/url_scanner/test_scans.py b/tests/api_resources/url_scanner/test_scans.py index 8a33a5f10ce..371efa725c5 100644 --- a/tests/api_resources/url_scanner/test_scans.py +++ b/tests/api_resources/url_scanner/test_scans.py @@ -32,7 +32,7 @@ class TestScans: @parametrize def test_method_create(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) @@ -40,7 +40,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", custom_headers={"foo": "string"}, screenshots_resolutions=["desktop", "mobile", "tablet"], @@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) @@ -63,7 +63,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) as response: assert not response.is_closed @@ -78,23 +78,23 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.url_scanner.scans.with_raw_response.create( - "", + account_id="", url="https://www.example.com", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) 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", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", full=True, ) assert_matches_type(ScanGetResponse, scan, path=["response"]) @@ -102,8 +102,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -114,8 +114,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -129,29 +129,29 @@ 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.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): client.url_scanner.scans.with_raw_response.get( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize def test_method_har(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert_matches_type(ScanHarResponse, scan, path=["response"]) @parametrize def test_raw_response_har(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -162,8 +162,8 @@ def test_raw_response_har(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_har(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -177,25 +177,25 @@ def test_streaming_response_har(self, client: Cloudflare) -> None: def test_path_params_har(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): client.url_scanner.scans.with_raw_response.har( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize @pytest.mark.respx(base_url=base_url) def test_method_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed assert scan.json() == {"foo": "bar"} @@ -205,12 +205,12 @@ def test_method_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> @parametrize @pytest.mark.respx(base_url=base_url) def test_method_screenshot_with_all_params(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", resolution="desktop", ) assert scan.is_closed @@ -221,13 +221,13 @@ def test_method_screenshot_with_all_params(self, client: Cloudflare, respx_mock: @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed is True @@ -238,12 +238,12 @@ def test_raw_response_screenshot(self, client: Cloudflare, respx_mock: MockRoute @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.url_scanner.scans.with_streaming_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as scan: assert not scan.is_closed assert scan.http_request.headers.get("X-Stainless-Lang") == "python" @@ -259,14 +259,14 @@ def test_streaming_response_screenshot(self, client: Cloudflare, respx_mock: Moc def test_path_params_screenshot(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): client.url_scanner.scans.with_raw_response.screenshot( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @@ -276,7 +276,7 @@ class TestAsyncScans: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) @@ -284,7 +284,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", custom_headers={"foo": "string"}, screenshots_resolutions=["desktop", "mobile", "tablet"], @@ -295,7 +295,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) @@ -307,7 +307,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) as response: assert not response.is_closed @@ -322,23 +322,23 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.url_scanner.scans.with_raw_response.create( - "", + account_id="", url="https://www.example.com", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) 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", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", full=True, ) assert_matches_type(ScanGetResponse, scan, path=["response"]) @@ -346,8 +346,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -358,8 +358,8 @@ 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.url_scanner.scans.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -373,29 +373,29 @@ 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.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.get( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize async def test_method_har(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert_matches_type(ScanHarResponse, scan, path=["response"]) @parametrize async def test_raw_response_har(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -406,8 +406,8 @@ async def test_raw_response_har(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_har(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -421,25 +421,25 @@ async def test_streaming_response_har(self, async_client: AsyncCloudflare) -> No async def test_path_params_har(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.har( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = await async_client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed assert await scan.json() == {"foo": "bar"} @@ -451,12 +451,12 @@ async def test_method_screenshot(self, async_client: AsyncCloudflare, respx_mock async def test_method_screenshot_with_all_params( self, async_client: AsyncCloudflare, respx_mock: MockRouter ) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = await async_client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", resolution="desktop", ) assert scan.is_closed @@ -467,13 +467,13 @@ async def test_method_screenshot_with_all_params( @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = await async_client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed is True @@ -484,12 +484,12 @@ async def test_raw_response_screenshot(self, async_client: AsyncCloudflare, resp @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.url_scanner.scans.with_streaming_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as scan: assert not scan.is_closed assert scan.http_request.headers.get("X-Stainless-Lang") == "python" @@ -505,12 +505,12 @@ async def test_streaming_response_screenshot(self, async_client: AsyncCloudflare async def test_path_params_screenshot(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.screenshot( - "", - account_id="string", + scan_id="", + account_id="accountId", ) diff --git a/tests/api_resources/user/test_invites.py b/tests/api_resources/user/test_invites.py index a428b30e8f9..9e47db517e9 100644 --- a/tests/api_resources/user/test_invites.py +++ b/tests/api_resources/user/test_invites.py @@ -46,7 +46,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: invite = client.user.invites.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) assert_matches_type(object, invite, path=["response"]) @@ -54,7 +54,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.user.invites.with_raw_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) @@ -66,7 +66,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.user.invites.with_streaming_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) as response: assert not response.is_closed @@ -81,7 +81,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): client.user.invites.with_raw_response.edit( - "", + invite_id="", status="accepted", ) @@ -155,7 +155,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: invite = await async_client.user.invites.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) assert_matches_type(object, invite, path=["response"]) @@ -163,7 +163,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.invites.with_raw_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) @@ -175,7 +175,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.user.invites.with_streaming_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) as response: assert not response.is_closed @@ -190,7 +190,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): await async_client.user.invites.with_raw_response.edit( - "", + invite_id="", status="accepted", ) diff --git a/tests/api_resources/user/test_subscriptions.py b/tests/api_resources/user/test_subscriptions.py index 95133505c93..c109797de83 100644 --- a/tests/api_resources/user/test_subscriptions.py +++ b/tests/api_resources/user/test_subscriptions.py @@ -25,15 +25,15 @@ class TestSubscriptions: @parametrize def test_method_update(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -71,7 +71,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -82,7 +82,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -96,7 +96,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.user.subscriptions.with_raw_response.update( - "", + identifier="", ) @parametrize @@ -140,15 +140,15 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -186,7 +186,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -197,7 +197,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -211,7 +211,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.user.subscriptions.with_raw_response.edit( - "", + identifier="", ) @parametrize @@ -246,15 +246,15 @@ class TestAsyncSubscriptions: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -292,7 +292,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -303,7 +303,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -317,7 +317,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.user.subscriptions.with_raw_response.update( - "", + identifier="", ) @parametrize @@ -361,15 +361,15 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -407,7 +407,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -418,7 +418,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -432,7 +432,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.user.subscriptions.with_raw_response.edit( - "", + identifier="", ) @parametrize diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index 84f1a588242..cf66f8daf04 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -220,7 +220,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: token = client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -256,7 +256,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: token = client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -339,7 +339,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -379,7 +379,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -739,7 +739,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -775,7 +775,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -858,7 +858,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -898,7 +898,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.update( - {}, + token_id={}, name="readonly token", policies=[ { diff --git a/tests/api_resources/user/tokens/test_value.py b/tests/api_resources/user/tokens/test_value.py index d4ef302b8e1..9eba90baaa8 100644 --- a/tests/api_resources/user/tokens/test_value.py +++ b/tests/api_resources/user/tokens/test_value.py @@ -19,7 +19,7 @@ class TestValue: @parametrize def test_method_update(self, client: Cloudflare) -> None: value = client.user.tokens.value.update( - {}, + token_id={}, body={}, ) assert_matches_type(str, value, path=["response"]) @@ -27,7 +27,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.tokens.value.with_raw_response.update( - {}, + token_id={}, body={}, ) @@ -39,7 +39,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.tokens.value.with_streaming_response.update( - {}, + token_id={}, body={}, ) as response: assert not response.is_closed @@ -57,7 +57,7 @@ class TestAsyncValue: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: value = await async_client.user.tokens.value.update( - {}, + token_id={}, body={}, ) assert_matches_type(str, value, path=["response"]) @@ -65,7 +65,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.value.with_raw_response.update( - {}, + token_id={}, body={}, ) @@ -77,7 +77,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.value.with_streaming_response.update( - {}, + token_id={}, body={}, ) as response: assert not response.is_closed diff --git a/tests/api_resources/vectorize/test_indexes.py b/tests/api_resources/vectorize/test_indexes.py index a4873ac1510..c24b21b2d96 100644 --- a/tests/api_resources/vectorize/test_indexes.py +++ b/tests/api_resources/vectorize/test_indexes.py @@ -99,7 +99,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: index = client.vectorize.indexes.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -121,7 +121,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) as response: @@ -137,14 +137,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="", description="This is my example index.", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.update( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -190,7 +190,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IndexDeleteResponse, index, path=["response"]) @@ -198,7 +198,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -210,7 +210,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -225,20 +225,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.delete( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete_by_ids(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) @@ -246,7 +246,7 @@ def test_method_delete_by_ids(self, client: Cloudflare) -> None: @parametrize def test_method_delete_by_ids_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -255,7 +255,7 @@ def test_method_delete_by_ids_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete_by_ids(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -267,7 +267,7 @@ def test_raw_response_delete_by_ids(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete_by_ids(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -282,20 +282,20 @@ def test_streaming_response_delete_by_ids(self, client: Cloudflare) -> None: def test_path_params_delete_by_ids(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.delete_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) @@ -303,7 +303,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -315,7 +315,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -330,20 +330,20 @@ 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.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.get( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get_by_ids(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, index, path=["response"]) @@ -351,7 +351,7 @@ def test_method_get_by_ids(self, client: Cloudflare) -> None: @parametrize def test_method_get_by_ids_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -360,7 +360,7 @@ def test_method_get_by_ids_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get_by_ids(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -372,7 +372,7 @@ def test_raw_response_get_by_ids(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get_by_ids(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -387,13 +387,13 @@ def test_streaming_response_get_by_ids(self, client: Cloudflare) -> None: def test_path_params_get_by_ids(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.get_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -401,7 +401,7 @@ def test_path_params_get_by_ids(self, client: Cloudflare) -> None: @parametrize def test_method_insert(self, client: Cloudflare) -> None: index = client.vectorize.indexes.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -411,7 +411,7 @@ def test_method_insert(self, client: Cloudflare) -> None: @parametrize def test_raw_response_insert(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -425,7 +425,7 @@ def test_raw_response_insert(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_insert(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -442,14 +442,14 @@ def test_streaming_response_insert(self, client: Cloudflare) -> None: def test_path_params_insert(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.insert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -457,7 +457,7 @@ def test_path_params_insert(self, client: Cloudflare) -> None: @parametrize def test_method_query(self, client: Cloudflare) -> None: index = client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -466,7 +466,7 @@ def test_method_query(self, client: Cloudflare) -> None: @parametrize def test_method_query_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], filter={ @@ -482,7 +482,7 @@ def test_method_query_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_query(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -495,7 +495,7 @@ def test_raw_response_query(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_query(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) as response: @@ -511,14 +511,14 @@ def test_streaming_response_query(self, client: Cloudflare) -> None: def test_path_params_query(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="", vector=[0.5, 0.5, 0.5], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.query( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -527,7 +527,7 @@ def test_path_params_query(self, client: Cloudflare) -> None: @parametrize def test_method_upsert(self, client: Cloudflare) -> None: index = client.vectorize.indexes.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -537,7 +537,7 @@ def test_method_upsert(self, client: Cloudflare) -> None: @parametrize def test_raw_response_upsert(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -551,7 +551,7 @@ def test_raw_response_upsert(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_upsert(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -568,14 +568,14 @@ def test_streaming_response_upsert(self, client: Cloudflare) -> None: def test_path_params_upsert(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.upsert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -658,7 +658,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -667,7 +667,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -680,7 +680,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) as response: @@ -696,14 +696,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="", description="This is my example index.", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.update( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -749,7 +749,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IndexDeleteResponse, index, path=["response"]) @@ -757,7 +757,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -769,7 +769,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -784,20 +784,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.delete( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete_by_ids(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) @@ -805,7 +805,7 @@ async def test_method_delete_by_ids(self, async_client: AsyncCloudflare) -> None @parametrize async def test_method_delete_by_ids_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -814,7 +814,7 @@ async def test_method_delete_by_ids_with_all_params(self, async_client: AsyncClo @parametrize async def test_raw_response_delete_by_ids(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -826,7 +826,7 @@ async def test_raw_response_delete_by_ids(self, async_client: AsyncCloudflare) - @parametrize async def test_streaming_response_delete_by_ids(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -841,20 +841,20 @@ async def test_streaming_response_delete_by_ids(self, async_client: AsyncCloudfl async def test_path_params_delete_by_ids(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.delete_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) @@ -862,7 +862,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -874,7 +874,7 @@ 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.vectorize.indexes.with_streaming_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -889,20 +889,20 @@ 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.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.get( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get_by_ids(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, index, path=["response"]) @@ -910,7 +910,7 @@ async def test_method_get_by_ids(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_by_ids_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -919,7 +919,7 @@ async def test_method_get_by_ids_with_all_params(self, async_client: AsyncCloudf @parametrize async def test_raw_response_get_by_ids(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -931,7 +931,7 @@ async def test_raw_response_get_by_ids(self, async_client: AsyncCloudflare) -> N @parametrize async def test_streaming_response_get_by_ids(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -946,13 +946,13 @@ async def test_streaming_response_get_by_ids(self, async_client: AsyncCloudflare async def test_path_params_get_by_ids(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.get_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -960,7 +960,7 @@ async def test_path_params_get_by_ids(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_insert(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -970,7 +970,7 @@ async def test_method_insert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_insert(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -984,7 +984,7 @@ async def test_raw_response_insert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_insert(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -1001,14 +1001,14 @@ async def test_streaming_response_insert(self, async_client: AsyncCloudflare) -> async def test_path_params_insert(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.insert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -1016,7 +1016,7 @@ async def test_path_params_insert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_query(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -1025,7 +1025,7 @@ async def test_method_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], filter={ @@ -1041,7 +1041,7 @@ async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -1054,7 +1054,7 @@ async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) as response: @@ -1070,14 +1070,14 @@ async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="", vector=[0.5, 0.5, 0.5], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.query( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -1086,7 +1086,7 @@ async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_upsert(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -1096,7 +1096,7 @@ async def test_method_upsert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_upsert(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -1110,7 +1110,7 @@ async def test_raw_response_upsert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_upsert(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -1127,14 +1127,14 @@ async def test_streaming_response_upsert(self, async_client: AsyncCloudflare) -> async def test_path_params_upsert(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.upsert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) diff --git a/tests/api_resources/waiting_rooms/events/test_details.py b/tests/api_resources/waiting_rooms/events/test_details.py index 3a81dca45f9..c164f78f6b8 100644 --- a/tests/api_resources/waiting_rooms/events/test_details.py +++ b/tests/api_resources/waiting_rooms/events/test_details.py @@ -20,7 +20,7 @@ class TestDetails: @parametrize def test_method_get(self, client: Cloudflare) -> None: detail = client.waiting_rooms.events.details.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.events.details.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -58,21 +58,21 @@ 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 `zone_id` but received ''"): client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.details.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -84,7 +84,7 @@ class TestAsyncDetails: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: detail = await async_client.waiting_rooms.events.details.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -106,7 +106,7 @@ 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.waiting_rooms.events.details.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -122,21 +122,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 `zone_id` but received ''"): await async_client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.details.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py index 2be3b4b028c..b416ff77d57 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -24,7 +24,7 @@ class TestEvents: @parametrize def test_method_create(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -71,7 +71,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -89,7 +89,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -98,7 +98,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -108,7 +108,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -120,7 +120,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -142,7 +142,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -158,7 +158,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -177,7 +177,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -187,7 +187,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -197,7 +197,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.update( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -208,7 +208,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Event], event, path=["response"]) @@ -216,7 +216,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page={}, per_page={}, @@ -226,7 +226,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -253,20 +253,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -275,7 +275,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -288,7 +288,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -304,21 +304,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.delete( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -326,7 +326,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -338,7 +338,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -360,7 +360,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -376,7 +376,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -395,7 +395,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -405,7 +405,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -415,7 +415,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.edit( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -426,7 +426,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -435,7 +435,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -448,7 +448,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -464,21 +464,21 @@ 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 `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -490,7 +490,7 @@ class TestAsyncEvents: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -501,7 +501,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -522,7 +522,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -537,7 +537,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -555,7 +555,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -564,7 +564,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -574,7 +574,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -586,7 +586,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -608,7 +608,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -624,7 +624,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -643,7 +643,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -653,7 +653,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -663,7 +663,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.update( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -674,7 +674,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Event], event, path=["response"]) @@ -682,7 +682,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page={}, per_page={}, @@ -692,7 +692,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -704,7 +704,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -719,20 +719,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -741,7 +741,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -754,7 +754,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -770,21 +770,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.delete( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -792,7 +792,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -804,7 +804,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -826,7 +826,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -842,7 +842,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -861,7 +861,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -871,7 +871,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -881,7 +881,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.edit( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -892,7 +892,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -901,7 +901,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -914,7 +914,7 @@ 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.waiting_rooms.events.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -930,21 +930,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 `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py index 0716bb86c5d..cb79bc2716b 100644 --- a/tests/api_resources/waiting_rooms/test_rules.py +++ b/tests/api_resources/waiting_rooms/test_rules.py @@ -27,7 +27,7 @@ class TestRules: @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -49,7 +49,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -63,7 +63,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -80,7 +80,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -88,7 +88,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -97,7 +97,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -119,7 +119,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -145,7 +145,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -174,7 +174,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", body=[ { @@ -194,7 +194,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -215,7 +215,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[WaitingRoomRule], rule, path=["response"]) @@ -223,7 +223,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -235,7 +235,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -250,20 +250,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -272,7 +272,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -285,7 +285,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -301,21 +301,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.waiting_rooms.rules.with_raw_response.delete( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -323,7 +323,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -334,7 +334,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -348,7 +348,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -363,7 +363,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -381,7 +381,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -390,7 +390,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", action="bypass_waiting_room", @@ -399,7 +399,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.waiting_rooms.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -413,7 +413,7 @@ class TestAsyncRules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -423,7 +423,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -435,7 +435,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -449,7 +449,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -466,7 +466,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -474,7 +474,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -483,7 +483,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -505,7 +505,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -531,7 +531,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -560,7 +560,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", body=[ { @@ -580,7 +580,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -601,7 +601,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[WaitingRoomRule], rule, path=["response"]) @@ -609,7 +609,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -621,7 +621,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -636,20 +636,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -658,7 +658,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -671,7 +671,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -687,21 +687,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.delete( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -709,7 +709,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -720,7 +720,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -734,7 +734,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -749,7 +749,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -767,7 +767,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -776,7 +776,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", action="bypass_waiting_room", @@ -785,7 +785,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", diff --git a/tests/api_resources/waiting_rooms/test_statuses.py b/tests/api_resources/waiting_rooms/test_statuses.py index 9a7ff6731a5..5ca8f12dbec 100644 --- a/tests/api_resources/waiting_rooms/test_statuses.py +++ b/tests/api_resources/waiting_rooms/test_statuses.py @@ -20,7 +20,7 @@ class TestStatuses: @parametrize def test_method_get(self, client: Cloudflare) -> None: status = client.waiting_rooms.statuses.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(StatusGetResponse, status, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.statuses.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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 `zone_id` but received ''"): client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.statuses.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncStatuses: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: status = await async_client.waiting_rooms.statuses.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(StatusGetResponse, status, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.waiting_rooms.statuses.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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 `zone_id` but received ''"): await async_client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.statuses.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py index d5891151684..af0aba72b11 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py @@ -26,7 +26,7 @@ class TestEntries: @parametrize def test_method_create(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -47,7 +47,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -61,7 +61,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -78,7 +78,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -86,7 +86,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -95,7 +95,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -106,7 +106,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -118,7 +118,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -133,7 +133,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -151,7 +151,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -160,7 +160,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -171,7 +171,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -181,7 +181,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) @@ -189,7 +189,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -201,7 +201,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -216,20 +216,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -251,7 +251,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -267,14 +267,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -283,7 +283,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -291,7 +291,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -300,7 +300,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -313,7 +313,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -329,14 +329,14 @@ 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 `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -345,7 +345,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -357,7 +357,7 @@ class TestAsyncEntries: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -367,7 +367,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -379,7 +379,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -394,7 +394,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -411,7 +411,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -419,7 +419,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -428,7 +428,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -439,7 +439,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -452,7 +452,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -468,7 +468,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -486,7 +486,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -495,7 +495,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -506,7 +506,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -516,7 +516,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) @@ -524,7 +524,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -536,7 +536,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -551,20 +551,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -574,7 +574,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -588,7 +588,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -604,14 +604,14 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -620,7 +620,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -628,7 +628,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -637,7 +637,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -650,7 +650,7 @@ 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.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -666,14 +666,14 @@ 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 `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -682,7 +682,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py index 9c682cddb81..1721a0e5ffe 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py @@ -20,7 +20,7 @@ class TestContentLists: @parametrize def test_method_update(self, client: Cloudflare) -> None: content_list = client.web3.hostnames.ipfs_universal_paths.content_lists.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -44,7 +44,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", action="block", entries=[{}, {}, {}], @@ -69,7 +69,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -78,7 +78,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: content_list = client.web3.hostnames.ipfs_universal_paths.content_lists.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ContentList, content_list, path=["response"]) @@ -86,7 +86,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -98,7 +98,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -113,13 +113,13 @@ 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 `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ class TestAsyncContentLists: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content_list = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -140,7 +140,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -154,7 +154,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -171,7 +171,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", action="block", entries=[{}, {}, {}], @@ -179,7 +179,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -188,7 +188,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: content_list = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ContentList, content_list, path=["response"]) @@ -196,7 +196,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -208,7 +208,7 @@ 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.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -223,12 +223,12 @@ 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 `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py index d12712ea809..563cd35edd3 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -21,7 +21,7 @@ class TestHostnames: @parametrize def test_method_create(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) @@ -51,7 +51,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) as response: assert not response.is_closed @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.create( - "", + zone_identifier="", target="ipfs", ) @@ -111,7 +111,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) @@ -119,7 +119,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -146,20 +146,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.with_raw_response.delete( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -167,7 +167,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -177,7 +177,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -204,20 +204,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.with_raw_response.edit( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -225,7 +225,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -237,7 +237,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -252,13 +252,13 @@ 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 `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -269,7 +269,7 @@ class TestAsyncHostnames: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -277,7 +277,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -287,7 +287,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) @@ -299,7 +299,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) as response: assert not response.is_closed @@ -314,7 +314,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.create( - "", + zone_identifier="", target="ipfs", ) @@ -359,7 +359,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) @@ -367,7 +367,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -379,7 +379,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -394,20 +394,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.delete( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -415,7 +415,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -425,7 +425,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -437,7 +437,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -452,20 +452,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.edit( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -473,7 +473,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -485,7 +485,7 @@ 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.web3.hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -500,12 +500,12 @@ 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 `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/ai/models/test_schema.py b/tests/api_resources/workers/ai/models/test_schema.py index 5937cee8a64..a815dc1f7c1 100644 --- a/tests/api_resources/workers/ai/models/test_schema.py +++ b/tests/api_resources/workers/ai/models/test_schema.py @@ -20,7 +20,7 @@ class TestSchema: def test_method_get(self, client: Cloudflare) -> None: schema = client.workers.ai.models.schema.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert_matches_type(object, schema, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.ai.models.schema.with_raw_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.ai.models.schema.with_streaming_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -55,7 +55,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.models.schema.with_raw_response.get( account_id="", - model="string", + model="model", ) @@ -66,7 +66,7 @@ class TestAsyncSchema: async def test_method_get(self, async_client: AsyncCloudflare) -> None: schema = await async_client.workers.ai.models.schema.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert_matches_type(object, schema, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.models.schema.with_raw_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert response.is_closed is True @@ -86,7 +86,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.models.schema.with_streaming_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -101,5 +101,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.models.schema.with_raw_response.get( account_id="", - model="string", + model="model", ) diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index ade69104c00..1863b3a060b 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -29,7 +29,7 @@ class TestContent: @parametrize def test_method_update(self, client: Cloudflare) -> None: content = client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -38,15 +38,15 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: content = client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "body_part": "worker.js", "main_module": "worker.js", }, - cf_worker_body_part="string", - cf_worker_main_module_part="string", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -54,7 +54,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -67,7 +67,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -83,13 +83,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -116,7 +116,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.workers.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -149,13 +149,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -167,7 +167,7 @@ class TestAsyncContent: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -176,15 +176,15 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "body_part": "worker.js", "main_module": "worker.js", }, - cf_worker_body_part="string", - cf_worker_main_module_part="string", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -192,7 +192,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -205,7 +205,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -221,13 +221,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -254,7 +254,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.workers.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -287,12 +287,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py index c49a56a7326..b5b08437d83 100644 --- a/tests/api_resources/workers/scripts/test_deployments.py +++ b/tests/api_resources/workers/scripts/test_deployments.py @@ -23,7 +23,7 @@ class TestDeployments: @parametrize def test_method_create(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @@ -31,17 +31,17 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", annotations={"workers_message": "Deploy bug fix."}, - strategy="string", + strategy="strategy", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.deployments.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,20 +68,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.deployments.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) @@ -89,7 +89,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -101,7 +101,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.deployments.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -116,13 +116,13 @@ 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.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.deployments.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -133,7 +133,7 @@ class TestAsyncDeployments: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @@ -141,17 +141,17 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", annotations={"workers_message": "Deploy bug fix."}, - strategy="string", + strategy="strategy", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -163,7 +163,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.deployments.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -178,20 +178,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) @@ -199,7 +199,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ 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.workers.scripts.deployments.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,12 +226,12 @@ 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.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_schedules.py b/tests/api_resources/workers/scripts/test_schedules.py index 1e4fbf7a577..084b83eef92 100644 --- a/tests/api_resources/workers/scripts/test_schedules.py +++ b/tests/api_resources/workers/scripts/test_schedules.py @@ -20,7 +20,7 @@ class TestSchedules: @parametrize def test_method_update(self, client: Cloudflare) -> None: schedule = client.workers.scripts.schedules.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -42,7 +42,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.scripts.schedules.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body="[{'cron': '*/30 * * * *'}]", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.schedules.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: schedule = client.workers.scripts.schedules.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) @@ -81,7 +81,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.schedules.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ 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.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.schedules.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncSchedules: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.workers.scripts.schedules.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -134,7 +134,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.schedules.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body="[{'cron': '*/30 * * * *'}]", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.schedules.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -178,7 +178,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.workers.scripts.schedules.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ 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.workers.scripts.schedules.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ 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.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.schedules.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py index 2a599b792e3..cb3a6f85760 100644 --- a/tests/api_resources/workers/scripts/test_settings.py +++ b/tests/api_resources/workers/scripts/test_settings.py @@ -20,7 +20,7 @@ class TestSettings: @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -28,7 +28,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", logpush=False, tail_consumers=[ @@ -54,7 +54,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -66,7 +66,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.workers.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -81,20 +81,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -102,7 +102,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -114,7 +114,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -129,13 +129,13 @@ 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.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -146,7 +146,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -154,7 +154,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", logpush=False, tail_consumers=[ @@ -180,7 +180,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -192,7 +192,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -207,20 +207,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -228,7 +228,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -240,7 +240,7 @@ 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.workers.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -255,12 +255,12 @@ 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.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_tail.py b/tests/api_resources/workers/scripts/test_tail.py index bfae28b968d..34740c57e6d 100644 --- a/tests/api_resources/workers/scripts/test_tail.py +++ b/tests/api_resources/workers/scripts/test_tail.py @@ -20,7 +20,7 @@ class TestTail: @parametrize def test_method_create(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.tail.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -82,7 +82,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -95,7 +95,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -111,21 +111,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.workers.scripts.tail.with_raw_response.delete( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -133,7 +133,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) @@ -141,7 +141,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -153,7 +153,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -168,13 +168,13 @@ 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.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.tail.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -185,7 +185,7 @@ class TestAsyncTail: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -194,7 +194,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -207,7 +207,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -223,14 +223,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.tail.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -238,7 +238,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -247,7 +247,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -260,7 +260,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -276,21 +276,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.workers.scripts.tail.with_raw_response.delete( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -298,7 +298,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) @@ -306,7 +306,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -318,7 +318,7 @@ 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.workers.scripts.tail.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -333,12 +333,12 @@ 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.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.tail.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_versions.py b/tests/api_resources/workers/scripts/test_versions.py index 1642da69882..4a0d47fbdc4 100644 --- a/tests/api_resources/workers/scripts/test_versions.py +++ b/tests/api_resources/workers/scripts/test_versions.py @@ -26,7 +26,7 @@ class TestVersions: @parametrize def test_method_create(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) @@ -35,13 +35,13 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "annotations": { "workers_message": "Fixed worker code.", - "workers_tag": "string", + "workers_tag": "workers/tag", }, "bindings": [ { @@ -63,7 +63,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -76,7 +76,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -92,20 +92,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.versions.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePagination[VersionListResponse], version, path=["response"]) @@ -113,7 +113,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", deployable=True, page=0, @@ -124,7 +124,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -151,20 +151,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.versions.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -173,7 +173,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -186,7 +186,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -202,21 +202,21 @@ 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.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `version_id` but received ''"): client.workers.scripts.versions.with_raw_response.get( - "", + version_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -229,7 +229,7 @@ class TestAsyncVersions: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) @@ -238,13 +238,13 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "annotations": { "workers_message": "Fixed worker code.", - "workers_tag": "string", + "workers_tag": "workers/tag", }, "bindings": [ { @@ -266,7 +266,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -279,7 +279,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -295,20 +295,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.versions.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePagination[VersionListResponse], version, path=["response"]) @@ -316,7 +316,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", deployable=True, page=0, @@ -327,7 +327,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -339,7 +339,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -354,20 +354,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.versions.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -376,7 +376,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -389,7 +389,7 @@ 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.workers.scripts.versions.with_streaming_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -405,21 +405,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.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `version_id` but received ''"): await async_client.workers.scripts.versions.with_raw_response.get( - "", + version_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index af717a3e838..aed9946b339 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -20,7 +20,7 @@ class TestAI: @parametrize def test_method_run_overload_1(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -29,7 +29,7 @@ def test_method_run_overload_1(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: def test_path_params_run_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -73,7 +73,7 @@ def test_path_params_run_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -82,7 +82,7 @@ def test_method_run_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -95,7 +95,7 @@ def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -111,14 +111,14 @@ def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: def test_path_params_run_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -126,7 +126,7 @@ def test_path_params_run_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -135,7 +135,7 @@ def test_method_run_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, @@ -151,7 +151,7 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None @parametrize def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -164,7 +164,7 @@ def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) as response: @@ -180,14 +180,14 @@ def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: def test_path_params_run_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -195,7 +195,7 @@ def test_path_params_run_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_4(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -204,7 +204,7 @@ def test_method_run_overload_4(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -217,7 +217,7 @@ def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -233,14 +233,14 @@ def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: def test_path_params_run_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -248,7 +248,7 @@ def test_path_params_run_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_5(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -257,7 +257,7 @@ def test_method_run_overload_5(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -270,7 +270,7 @@ def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) as response: @@ -286,14 +286,14 @@ def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: def test_path_params_run_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", audio=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -301,7 +301,7 @@ def test_path_params_run_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_6(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -310,7 +310,7 @@ def test_method_run_overload_6(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -323,7 +323,7 @@ def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -339,14 +339,14 @@ def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: def test_path_params_run_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -354,7 +354,7 @@ def test_path_params_run_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -362,7 +362,7 @@ def test_method_run_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -371,7 +371,7 @@ def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None @parametrize def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -383,7 +383,7 @@ def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -398,20 +398,20 @@ def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: def test_path_params_run_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_run_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -419,22 +419,22 @@ def test_method_run_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lora="string", + lora="lora", max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], prompt="x", @@ -446,7 +446,7 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None @parametrize def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -458,7 +458,7 @@ def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -473,22 +473,22 @@ def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: def test_path_params_run_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_run_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -496,20 +496,20 @@ def test_method_run_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", - source_lang="string", + source_lang="source_lang", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @@ -521,9 +521,9 @@ def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) as response: assert not response.is_closed @@ -538,24 +538,24 @@ def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: def test_path_params_run_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", - target_lang="string", + target_lang="target_lang", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @parametrize def test_method_run_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -564,7 +564,7 @@ def test_method_run_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", max_length=0, @@ -574,7 +574,7 @@ def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> Non @parametrize def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -587,7 +587,7 @@ def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) as response: @@ -603,14 +603,14 @@ def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: def test_path_params_run_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", input_text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -618,7 +618,7 @@ def test_path_params_run_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -627,25 +627,25 @@ def test_method_run_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], - prompt="string", + prompt="prompt", raw=True, temperature=0, ) @@ -654,7 +654,7 @@ def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> Non @parametrize def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -667,7 +667,7 @@ def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -683,14 +683,14 @@ def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: def test_path_params_run_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -702,7 +702,7 @@ class TestAsyncAI: @parametrize async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -711,7 +711,7 @@ async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -724,7 +724,7 @@ async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -740,14 +740,14 @@ async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudf async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -755,7 +755,7 @@ async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -764,7 +764,7 @@ async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -777,7 +777,7 @@ async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -793,14 +793,14 @@ async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudf async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -808,7 +808,7 @@ async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -817,7 +817,7 @@ async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, @@ -833,7 +833,7 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl @parametrize async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -846,7 +846,7 @@ async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) as response: @@ -862,14 +862,14 @@ async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudf async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -877,7 +877,7 @@ async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -886,7 +886,7 @@ async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -899,7 +899,7 @@ async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -915,14 +915,14 @@ async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudf async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -930,7 +930,7 @@ async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -939,7 +939,7 @@ async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -952,7 +952,7 @@ async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) as response: @@ -968,14 +968,14 @@ async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudf async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", audio=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -983,7 +983,7 @@ async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -992,7 +992,7 @@ async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1005,7 +1005,7 @@ async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -1021,14 +1021,14 @@ async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudf async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1036,7 +1036,7 @@ async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -1044,7 +1044,7 @@ async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1053,7 +1053,7 @@ async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCl @parametrize async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1065,7 +1065,7 @@ async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1080,20 +1080,20 @@ async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudf async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -1101,22 +1101,22 @@ async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lora="string", + lora="lora", max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], prompt="x", @@ -1128,7 +1128,7 @@ async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCl @parametrize async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1140,7 +1140,7 @@ async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1155,22 +1155,22 @@ async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudf async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -1178,20 +1178,20 @@ async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", - source_lang="string", + source_lang="source_lang", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @@ -1203,9 +1203,9 @@ async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) as response: assert not response.is_closed @@ -1220,24 +1220,24 @@ async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudf async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", - target_lang="string", + target_lang="target_lang", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @parametrize async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -1246,7 +1246,7 @@ async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", max_length=0, @@ -1256,7 +1256,7 @@ async def test_method_run_with_all_params_overload_10(self, async_client: AsyncC @parametrize async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -1269,7 +1269,7 @@ async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) as response: @@ -1285,14 +1285,14 @@ async def test_streaming_response_run_overload_10(self, async_client: AsyncCloud async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", input_text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -1300,7 +1300,7 @@ async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1309,25 +1309,25 @@ async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], - prompt="string", + prompt="prompt", raw=True, temperature=0, ) @@ -1336,7 +1336,7 @@ async def test_method_run_with_all_params_overload_11(self, async_client: AsyncC @parametrize async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1349,7 +1349,7 @@ async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -1365,14 +1365,14 @@ async def test_streaming_response_run_overload_11(self, async_client: AsyncCloud async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) diff --git a/tests/api_resources/workers/test_domains.py b/tests/api_resources/workers/test_domains.py index 7de5c103792..1bbc559f8f8 100644 --- a/tests/api_resources/workers/test_domains.py +++ b/tests/api_resources/workers/test_domains.py @@ -125,7 +125,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: domain = client.workers.domains.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert domain is None @@ -133,7 +133,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -145,7 +145,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -160,20 +160,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): client.workers.domains.with_raw_response.delete( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.workers.domains.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert_matches_type(Optional[Domain], domain, path=["response"]) @@ -181,7 +181,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -193,7 +193,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -208,13 +208,13 @@ 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.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): client.workers.domains.with_raw_response.get( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -329,7 +329,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert domain is None @@ -337,7 +337,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -349,7 +349,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.domains.with_streaming_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -364,20 +364,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): await async_client.workers.domains.with_raw_response.delete( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert_matches_type(Optional[Domain], domain, path=["response"]) @@ -385,7 +385,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -397,7 +397,7 @@ 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.workers.domains.with_streaming_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -412,12 +412,12 @@ 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.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): await async_client.workers.domains.with_raw_response.get( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index 0bd3fc17497..219b9844363 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -30,7 +30,7 @@ class TestScripts: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -39,7 +39,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -64,33 +64,33 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -123,7 +123,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -152,13 +152,13 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -166,7 +166,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -175,10 +175,10 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - message="string", + message="message", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -186,7 +186,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -199,7 +199,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -215,13 +215,13 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -266,7 +266,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: script = client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script is None @@ -274,7 +274,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: script = client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", force=True, ) @@ -283,7 +283,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -295,7 +295,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -310,13 +310,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -327,7 +327,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: return_value=httpx.Response(200, json={"foo": "bar"}) ) script = client.workers.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script.is_closed @@ -343,7 +343,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ) script = client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -359,7 +359,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.workers.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as script: assert not script.is_closed @@ -376,13 +376,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -394,7 +394,7 @@ class TestAsyncScripts: @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -403,7 +403,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -428,33 +428,33 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -487,7 +487,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -500,7 +500,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -516,13 +516,13 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -530,7 +530,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -539,10 +539,10 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - message="string", + message="message", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -550,7 +550,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -563,7 +563,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -579,13 +579,13 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -630,7 +630,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script is None @@ -638,7 +638,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", force=True, ) @@ -647,7 +647,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -659,7 +659,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -674,13 +674,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -691,7 +691,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR return_value=httpx.Response(200, json={"foo": "bar"}) ) script = await async_client.workers.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script.is_closed @@ -707,7 +707,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ) script = await async_client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -723,7 +723,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.workers.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as script: assert not script.is_closed @@ -740,12 +740,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py index 29c42f700b9..90c53166d4d 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py @@ -20,7 +20,7 @@ class TestBindings: @parametrize def test_method_get(self, client: Cloudflare) -> None: binding = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -58,21 +58,21 @@ 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.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -84,7 +84,7 @@ class TestAsyncBindings: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: binding = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -106,7 +106,7 @@ 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.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -122,21 +122,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.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) 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 cfbbc556765..f120ae9e897 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 @@ -29,7 +29,7 @@ class TestContent: @parametrize def test_method_update(self, client: Cloudflare) -> None: content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -39,7 +39,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -47,8 +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", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -56,7 +56,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -70,7 +70,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -87,21 +87,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -113,7 +113,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers_for_platforms.dispatch.namespaces.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -130,7 +130,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -147,7 +147,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as content: @@ -165,21 +165,21 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -192,7 +192,7 @@ class TestAsyncContent: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -202,7 +202,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -210,8 +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", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -220,7 +220,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -235,7 +235,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -252,21 +252,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -278,7 +278,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -295,7 +295,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -312,7 +312,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as content: @@ -330,21 +330,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py index d839e9074b8..a8d4a57e938 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py @@ -24,7 +24,7 @@ class TestSecrets: @parametrize def test_method_update(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -33,7 +33,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", name="MY_SECRET", @@ -45,7 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -58,7 +58,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -74,21 +74,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -96,7 +96,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -105,7 +105,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -118,7 +118,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -134,21 +134,21 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -160,7 +160,7 @@ class TestAsyncSecrets: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -169,7 +169,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", name="MY_SECRET", @@ -182,7 +182,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -196,7 +196,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -212,21 +212,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -234,7 +234,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -243,7 +243,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -256,7 +256,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -272,21 +272,21 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py index c96a0c83565..29d130ed83b 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py @@ -24,7 +24,7 @@ class TestSettings: @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -34,7 +34,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", settings={ @@ -54,33 +54,33 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -112,7 +112,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -126,7 +126,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -143,21 +143,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -165,7 +165,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -174,7 +174,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -203,21 +203,21 @@ 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.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -230,7 +230,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -240,7 +240,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", settings={ @@ -260,33 +260,33 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -318,7 +318,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -332,7 +332,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -349,21 +349,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -371,7 +371,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -380,7 +380,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -393,7 +393,7 @@ 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.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -409,21 +409,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.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py index a72e6183c72..382d4d2b376 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py @@ -24,7 +24,7 @@ class TestTags: @parametrize def test_method_update(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -48,7 +48,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -65,7 +65,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", body=["my-tag", "my-tag", "my-tag"], @@ -81,7 +81,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -90,7 +90,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -99,7 +99,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -112,7 +112,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -128,21 +128,21 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -150,7 +150,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -160,7 +160,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -174,7 +174,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -191,7 +191,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -199,7 +199,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", script_name="this-is_my_script-01", @@ -207,7 +207,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="", @@ -215,7 +215,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "", + tag="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -228,7 +228,7 @@ class TestAsyncTags: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -238,7 +238,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -252,7 +252,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -269,7 +269,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -277,7 +277,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", body=["my-tag", "my-tag", "my-tag"], @@ -285,7 +285,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -294,7 +294,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -303,7 +303,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -316,7 +316,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -332,21 +332,21 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -354,7 +354,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -364,7 +364,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -378,7 +378,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -395,7 +395,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -403,7 +403,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", script_name="this-is_my_script-01", @@ -411,7 +411,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="", @@ -419,7 +419,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "", + tag="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 13bbacf62f1..febd78c036e 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -24,7 +24,7 @@ class TestScripts: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -34,7 +34,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -59,33 +59,33 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -118,7 +118,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -132,7 +132,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -149,21 +149,21 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -172,7 +172,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -182,10 +182,10 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - message="string", + message="message", ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) @@ -193,7 +193,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -207,7 +207,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -224,21 +224,21 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -246,7 +246,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -255,7 +255,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", force=True, @@ -265,7 +265,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -278,7 +278,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -294,21 +294,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -316,7 +316,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -325,7 +325,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -338,7 +338,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -354,21 +354,21 @@ 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.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -381,7 +381,7 @@ class TestAsyncScripts: @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -391,7 +391,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -416,33 +416,33 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -475,7 +475,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -489,7 +489,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -506,21 +506,21 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -529,7 +529,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -539,10 +539,10 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - message="string", + message="message", ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) @@ -550,7 +550,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -564,7 +564,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -581,21 +581,21 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -603,7 +603,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -612,7 +612,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", force=True, @@ -622,7 +622,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -635,7 +635,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -651,21 +651,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -673,7 +673,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -682,7 +682,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -695,7 +695,7 @@ 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.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -711,21 +711,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.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py index cecc0bdbcf4..df9749cb2e5 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py +++ b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py @@ -109,7 +109,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, namespace, path=["response"]) @@ -117,7 +117,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -129,7 +129,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -144,20 +144,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) @@ -165,7 +165,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -177,7 +177,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -192,13 +192,13 @@ 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.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -293,7 +293,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, namespace, path=["response"]) @@ -301,7 +301,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -313,7 +313,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.with_streaming_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -328,20 +328,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -361,7 +361,7 @@ 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.workers_for_platforms.dispatch.namespaces.with_streaming_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -376,12 +376,12 @@ 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.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py index d544d4b922b..4c7af3be6a5 100644 --- a/tests/api_resources/zero_trust/access/applications/test_cas.py +++ b/tests/api_resources/zero_trust/access/applications/test_cas.py @@ -22,8 +22,8 @@ class TestCAs: @parametrize def test_method_create(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -31,8 +31,8 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -40,8 +40,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -53,8 +53,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,27 +69,27 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) @@ -97,7 +97,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) @@ -105,7 +105,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -117,7 +117,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -137,15 +137,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -153,8 +153,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -162,8 +162,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -175,8 +175,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -191,28 +191,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -220,8 +220,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -229,8 +229,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -242,8 +242,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -258,20 +258,20 @@ 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 `app_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -282,8 +282,8 @@ class TestAsyncCAs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -291,8 +291,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -300,8 +300,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -313,8 +313,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -329,27 +329,27 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) @@ -357,7 +357,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) @@ -365,7 +365,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -377,7 +377,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -397,15 +397,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -413,8 +413,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -422,8 +422,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -435,8 +435,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -451,28 +451,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -480,8 +480,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -489,8 +489,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -502,8 +502,8 @@ 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.zero_trust.access.applications.cas.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -518,18 +518,18 @@ 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 `app_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py index 767aa03ea30..2e0b22b4680 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -28,7 +28,7 @@ class TestPolicies: @parametrize def test_method_create(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) @@ -44,7 +44,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -52,12 +52,12 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -88,7 +88,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -96,7 +96,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -108,7 +108,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -116,7 +116,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -131,7 +131,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.create( - "", + app_id="", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -139,12 +139,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -157,7 +157,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -165,14 +165,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -181,7 +181,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -189,7 +189,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -198,12 +198,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -234,7 +234,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -243,7 +243,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -255,7 +255,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -264,7 +264,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -279,7 +279,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", decision="allow", include=[ @@ -288,12 +288,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -302,12 +302,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -321,7 +321,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -330,15 +330,15 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(SyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -346,8 +346,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(SyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -355,8 +355,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -368,8 +368,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -384,29 +384,29 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -414,9 +414,9 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -424,9 +424,9 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -438,9 +438,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -455,39 +455,39 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -495,9 +495,9 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -505,9 +505,9 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -519,9 +519,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -536,30 +536,30 @@ 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 `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) @@ -570,7 +570,7 @@ class TestAsyncPolicies: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -578,7 +578,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) @@ -586,7 +586,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -594,12 +594,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -630,7 +630,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -638,7 +638,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -650,7 +650,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -658,7 +658,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -673,7 +673,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "", + app_id="", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -681,12 +681,12 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -699,7 +699,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -707,14 +707,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -723,7 +723,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -731,7 +731,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -740,12 +740,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -776,7 +776,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -785,7 +785,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -797,7 +797,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -806,7 +806,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -821,7 +821,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", decision="allow", include=[ @@ -830,12 +830,12 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -844,12 +844,12 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -863,7 +863,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -872,15 +872,15 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -888,8 +888,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -897,8 +897,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -910,8 +910,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -926,29 +926,29 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -956,9 +956,9 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -966,9 +966,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -980,9 +980,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -997,39 +997,39 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -1037,9 +1037,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -1047,9 +1047,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1061,9 +1061,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.zero_trust.access.applications.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1078,28 +1078,28 @@ 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 `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py index 8fc0b51814e..af0dc1ed1f8 100644 --- a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py +++ b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py @@ -21,8 +21,8 @@ class TestUserPolicyChecks: @parametrize def test_method_list(self, client: Cloudflare) -> None: user_policy_check = client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -30,8 +30,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: user_policy_check = client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -39,8 +39,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -52,8 +52,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.user_policy_checks.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,14 +68,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @@ -86,8 +86,8 @@ class TestAsyncUserPolicyChecks: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: user_policy_check = await async_client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -95,8 +95,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: user_policy_check = await async_client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -104,8 +104,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -117,8 +117,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.user_policy_checks.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -133,12 +133,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/certificates/test_settings.py b/tests/api_resources/zero_trust/access/certificates/test_settings.py index 444f9b77fb8..b7b66bf60f7 100644 --- a/tests/api_resources/zero_trust/access/certificates/test_settings.py +++ b/tests/api_resources/zero_trust/access/certificates/test_settings.py @@ -41,7 +41,7 @@ def test_method_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -66,7 +66,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -91,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -120,7 +120,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -174,14 +174,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -189,7 +189,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -197,7 +197,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -209,7 +209,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -229,7 +229,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) @@ -257,7 +257,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -282,7 +282,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -336,7 +336,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -390,14 +390,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -405,7 +405,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -413,7 +413,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -425,7 +425,7 @@ 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.zero_trust.access.certificates.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -445,5 +445,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 30888509a93..1bac74bcb05 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -31,7 +31,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -41,7 +41,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -60,9 +60,9 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -91,13 +91,13 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -133,7 +133,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -149,7 +149,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -163,7 +163,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -187,14 +187,14 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -202,7 +202,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: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -260,13 +260,13 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -302,7 +302,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -313,7 +313,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.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -325,7 +325,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.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -345,7 +345,7 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -354,7 +354,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -364,7 +364,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -383,9 +383,9 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -414,13 +414,13 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -456,7 +456,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -472,7 +472,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -486,7 +486,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -510,7 +510,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -519,7 +519,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -529,7 +529,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -548,9 +548,9 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -579,13 +579,13 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -621,7 +621,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -637,7 +637,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -651,7 +651,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -675,7 +675,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -683,7 +683,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: def test_method_create_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -692,7 +692,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -715,13 +715,13 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -757,7 +757,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -768,7 +768,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -781,7 +781,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -803,7 +803,7 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -811,7 +811,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: def test_method_create_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -820,7 +820,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -843,13 +843,13 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -885,7 +885,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -896,7 +896,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -909,7 +909,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -931,7 +931,7 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -939,7 +939,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: def test_method_create_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -948,7 +948,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -971,13 +971,13 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1013,7 +1013,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -1024,7 +1024,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1037,7 +1037,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1059,14 +1059,14 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -1074,20 +1074,20 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1123,7 +1123,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -1134,7 +1134,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.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1146,7 +1146,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.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1166,17 +1166,17 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1184,10 +1184,10 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1206,9 +1206,9 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1237,13 +1237,13 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1279,7 +1279,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -1293,10 +1293,10 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1308,10 +1308,10 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1326,7 +1326,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", account_id="", @@ -1334,18 +1334,18 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1353,8 +1353,8 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1412,13 +1412,13 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1454,7 +1454,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -1465,8 +1465,8 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -1478,8 +1478,8 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1494,24 +1494,24 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1519,10 +1519,10 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1541,9 +1541,9 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1572,13 +1572,13 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1614,7 +1614,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -1628,10 +1628,10 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1643,10 +1643,10 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1661,7 +1661,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", account_id="", @@ -1669,20 +1669,20 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1690,10 +1690,10 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1712,9 +1712,9 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1743,13 +1743,13 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1785,7 +1785,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -1799,10 +1799,10 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1814,10 +1814,10 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1832,7 +1832,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", account_id="", @@ -1840,19 +1840,19 @@ 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 ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1860,9 +1860,9 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1885,13 +1885,13 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1927,7 +1927,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -1937,9 +1937,9 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1951,9 +1951,9 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1968,25 +1968,25 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1994,9 +1994,9 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2019,13 +2019,13 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2061,7 +2061,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -2071,9 +2071,9 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2085,9 +2085,9 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2102,25 +2102,25 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -2128,9 +2128,9 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2153,13 +2153,13 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2195,7 +2195,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -2205,9 +2205,9 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2219,9 +2219,9 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2236,24 +2236,24 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -2261,21 +2261,21 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2311,7 +2311,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -2322,8 +2322,8 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2335,8 +2335,8 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2351,21 +2351,21 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -2373,7 +2373,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -2381,7 +2381,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2393,7 +2393,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2413,15 +2413,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -2429,8 +2429,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -2438,8 +2438,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2451,8 +2451,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2467,22 +2467,22 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -2490,8 +2490,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -2499,8 +2499,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2512,8 +2512,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2528,22 +2528,22 @@ 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.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_revoke_tokens(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -2551,8 +2551,8 @@ def test_method_revoke_tokens(self, client: Cloudflare) -> None: @parametrize def test_method_revoke_tokens_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -2560,8 +2560,8 @@ def test_method_revoke_tokens_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_revoke_tokens(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2573,8 +2573,8 @@ def test_raw_response_revoke_tokens(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_revoke_tokens(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2589,14 +2589,14 @@ def test_streaming_response_revoke_tokens(self, client: Cloudflare) -> None: def test_path_params_revoke_tokens(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @@ -2609,7 +2609,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -2619,7 +2619,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2638,9 +2638,9 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2669,13 +2669,13 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2711,7 +2711,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -2727,7 +2727,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2741,7 +2741,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2765,14 +2765,14 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -2780,7 +2780,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: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2838,13 +2838,13 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2880,7 +2880,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -2891,7 +2891,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.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2903,7 +2903,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.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2923,7 +2923,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -2932,7 +2932,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -2942,7 +2942,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2961,9 +2961,9 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2992,13 +2992,13 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3034,7 +3034,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -3050,7 +3050,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3064,7 +3064,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3088,7 +3088,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3097,7 +3097,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3107,7 +3107,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -3126,9 +3126,9 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3157,13 +3157,13 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3199,7 +3199,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -3215,7 +3215,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3229,7 +3229,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3253,7 +3253,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3261,7 +3261,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3270,7 +3270,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3293,13 +3293,13 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3335,7 +3335,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -3346,7 +3346,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3359,7 +3359,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3381,7 +3381,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3389,7 +3389,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3398,7 +3398,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3421,13 +3421,13 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3463,7 +3463,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -3474,7 +3474,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3487,7 +3487,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3509,7 +3509,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3517,7 +3517,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3526,7 +3526,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3549,13 +3549,13 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3591,7 +3591,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -3602,7 +3602,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3615,7 +3615,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3637,14 +3637,14 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3652,20 +3652,20 @@ 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: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3701,7 +3701,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -3712,7 +3712,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.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3724,7 +3724,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.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3744,17 +3744,17 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -3762,10 +3762,10 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -3784,9 +3784,9 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3815,13 +3815,13 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3857,7 +3857,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -3871,10 +3871,10 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3886,10 +3886,10 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3904,7 +3904,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", account_id="", @@ -3912,18 +3912,18 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -3931,8 +3931,8 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3990,13 +3990,13 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4032,7 +4032,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -4043,8 +4043,8 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -4056,8 +4056,8 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4072,24 +4072,24 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4097,10 +4097,10 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -4119,9 +4119,9 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4150,13 +4150,13 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4192,7 +4192,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -4206,10 +4206,10 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4221,10 +4221,10 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4239,7 +4239,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", account_id="", @@ -4247,20 +4247,20 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4268,10 +4268,10 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -4290,9 +4290,9 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4321,13 +4321,13 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4363,7 +4363,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -4377,10 +4377,10 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4392,10 +4392,10 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4410,7 +4410,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", account_id="", @@ -4418,19 +4418,19 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4438,9 +4438,9 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4463,13 +4463,13 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4505,7 +4505,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -4515,9 +4515,9 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4529,9 +4529,9 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4546,25 +4546,25 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4572,9 +4572,9 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4597,13 +4597,13 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4639,7 +4639,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -4649,9 +4649,9 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4663,9 +4663,9 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4680,25 +4680,25 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4706,9 +4706,9 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4731,13 +4731,13 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4773,7 +4773,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -4783,9 +4783,9 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4797,9 +4797,9 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4814,24 +4814,24 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4839,21 +4839,21 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4889,7 +4889,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -4900,8 +4900,8 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -4913,8 +4913,8 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4929,21 +4929,21 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo 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 `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -4951,7 +4951,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -4959,7 +4959,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4971,7 +4971,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4991,15 +4991,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -5007,8 +5007,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -5016,8 +5016,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -5029,8 +5029,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5045,22 +5045,22 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -5068,8 +5068,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -5077,8 +5077,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -5090,8 +5090,8 @@ 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.zero_trust.access.applications.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5106,22 +5106,22 @@ 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.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_revoke_tokens(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -5129,8 +5129,8 @@ async def test_method_revoke_tokens(self, async_client: AsyncCloudflare) -> None @parametrize async def test_method_revoke_tokens_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -5138,8 +5138,8 @@ async def test_method_revoke_tokens_with_all_params(self, async_client: AsyncClo @parametrize async def test_raw_response_revoke_tokens(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -5151,8 +5151,8 @@ async def test_raw_response_revoke_tokens(self, async_client: AsyncCloudflare) - @parametrize async def test_streaming_response_revoke_tokens(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5167,12 +5167,12 @@ async def test_streaming_response_revoke_tokens(self, async_client: AsyncCloudfl async def test_path_params_revoke_tokens(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.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py index 5cd16fddf4a..2e04d6c5af3 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -24,7 +24,7 @@ class TestBookmarks: @parametrize def test_method_create(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -46,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -62,14 +62,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.create( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -86,7 +86,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -99,7 +99,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -115,14 +115,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.update( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -168,7 +168,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) @@ -176,7 +176,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -188,7 +188,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -203,20 +203,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.delete( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) @@ -224,7 +224,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -236,7 +236,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -251,13 +251,13 @@ 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.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.get( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -268,7 +268,7 @@ class TestAsyncBookmarks: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -277,7 +277,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -290,7 +290,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -306,14 +306,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.create( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -321,7 +321,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -330,7 +330,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -343,7 +343,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -359,14 +359,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.update( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -412,7 +412,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) @@ -420,7 +420,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -432,7 +432,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -447,20 +447,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.delete( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) @@ -468,7 +468,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -480,7 +480,7 @@ 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.zero_trust.access.bookmarks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -495,12 +495,12 @@ 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.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.get( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index cfcd002940d..a6a37770c61 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -27,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -37,7 +37,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -62,7 +62,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,16 +86,16 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -103,9 +103,9 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -114,9 +114,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -128,9 +128,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,30 +145,30 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.update( - "", + certificate_id="", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) @@ -176,7 +176,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) @@ -184,7 +184,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -196,7 +196,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -216,15 +216,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -232,8 +232,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -241,8 +241,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -254,8 +254,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -270,28 +270,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -299,8 +299,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -308,8 +308,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -321,8 +321,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -337,20 +337,20 @@ 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 `certificate_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -363,7 +363,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -373,7 +373,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare certificate = await async_client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -384,7 +384,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -398,7 +398,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.certificates.with_streaming_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -422,16 +422,16 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -439,9 +439,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -450,9 +450,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -464,9 +464,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -481,30 +481,30 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.update( - "", + certificate_id="", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) @@ -512,7 +512,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) @@ -520,7 +520,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -532,7 +532,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -552,15 +552,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -568,8 +568,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -577,8 +577,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -590,8 +590,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -606,28 +606,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -635,8 +635,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -644,8 +644,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -657,8 +657,8 @@ 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.zero_trust.access.certificates.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -673,18 +673,18 @@ 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 `certificate_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index 1482ad94f17..552c71677be 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -83,17 +83,17 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.access.custom_pages.with_raw_response.create( account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -101,10 +101,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -116,10 +116,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -131,10 +131,10 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -149,19 +149,19 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.update( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -206,7 +206,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) @@ -214,7 +214,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -226,7 +226,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -241,20 +241,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.delete( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) @@ -262,7 +262,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -274,7 +274,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -289,13 +289,13 @@ 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.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.get( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -308,7 +308,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -318,7 +318,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare custom_page = await async_client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -332,7 +332,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -346,7 +346,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.custom_pages.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -363,17 +363,17 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.custom_pages.with_raw_response.create( account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -381,10 +381,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -396,10 +396,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -411,10 +411,10 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -429,19 +429,19 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.update( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -486,7 +486,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) @@ -494,7 +494,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -506,7 +506,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -521,20 +521,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.delete( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) @@ -542,7 +542,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -554,7 +554,7 @@ 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.zero_trust.access.custom_pages.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -569,12 +569,12 @@ 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.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.get( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index c9f83d20c8b..f8f2d26c57f 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -45,7 +45,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -70,7 +70,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -88,7 +88,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,21 +120,21 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -142,14 +142,14 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -168,14 +168,14 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -187,14 +187,14 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -209,19 +209,19 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.zero_trust.access.groups.with_raw_response.update( - "", + group_id="", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -233,21 +233,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -255,7 +255,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -263,7 +263,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -275,7 +275,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -295,15 +295,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -311,8 +311,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -320,8 +320,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -333,8 +333,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -349,28 +349,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -378,8 +378,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -387,8 +387,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -400,8 +400,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -416,20 +416,20 @@ 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 `group_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -446,7 +446,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -485,7 +485,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -503,7 +503,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -535,21 +535,21 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -557,14 +557,14 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -583,14 +583,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -602,14 +602,14 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -624,19 +624,19 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.update( - "", + group_id="", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -648,21 +648,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -670,7 +670,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -678,7 +678,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -690,7 +690,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -710,15 +710,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -726,8 +726,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -735,8 +735,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -748,8 +748,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -764,28 +764,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -793,8 +793,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -802,8 +802,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -815,8 +815,8 @@ 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.zero_trust.access.groups.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -831,18 +831,18 @@ 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 `group_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_policies.py b/tests/api_resources/zero_trust/access/test_policies.py index dd11538c159..168b7507017 100644 --- a/tests/api_resources/zero_trust/access/test_policies.py +++ b/tests/api_resources/zero_trust/access/test_policies.py @@ -53,7 +53,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -134,7 +134,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -149,7 +149,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -162,7 +162,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -191,7 +191,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -210,7 +210,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -232,7 +232,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", decision="allow", include=[ @@ -245,7 +245,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -297,7 +297,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -305,7 +305,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -317,7 +317,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -332,20 +332,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -353,7 +353,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -365,7 +365,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -380,13 +380,13 @@ 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.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -423,7 +423,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -504,7 +504,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -519,7 +519,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -532,7 +532,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -561,7 +561,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -580,7 +580,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -602,7 +602,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", decision="allow", include=[ @@ -615,7 +615,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -667,7 +667,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -675,7 +675,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -687,7 +687,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -702,20 +702,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -723,7 +723,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -735,7 +735,7 @@ 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.zero_trust.access.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -750,12 +750,12 @@ 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.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py index 6031d72107d..4d3c6fb8b78 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -27,7 +27,7 @@ class TestServiceTokens: def test_method_create(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -46,7 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -81,15 +81,15 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -97,8 +97,8 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", duration="60m", name="CI/CD token", ) @@ -108,8 +108,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -121,8 +121,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -137,27 +137,27 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -165,7 +165,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -173,7 +173,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -185,7 +185,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -205,15 +205,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -221,8 +221,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -230,8 +230,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -243,8 +243,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -259,28 +259,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -288,8 +288,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -297,8 +297,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -310,8 +310,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -326,26 +326,26 @@ 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 `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.get( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @parametrize def test_method_refresh(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -353,7 +353,7 @@ def test_method_refresh(self, client: Cloudflare) -> None: @parametrize def test_raw_response_refresh(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -365,7 +365,7 @@ def test_raw_response_refresh(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_refresh(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -380,20 +380,20 @@ def test_streaming_response_refresh(self, client: Cloudflare) -> None: def test_path_params_refresh(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.refresh( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_rotate(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) @@ -401,7 +401,7 @@ def test_method_rotate(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rotate(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -413,7 +413,7 @@ def test_raw_response_rotate(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rotate(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -428,13 +428,13 @@ def test_streaming_response_rotate(self, client: Cloudflare) -> None: def test_path_params_rotate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.rotate( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -447,7 +447,7 @@ class TestAsyncServiceTokens: async def test_method_create(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -456,7 +456,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -466,7 +466,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -479,7 +479,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,15 +501,15 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -517,8 +517,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", duration="60m", name="CI/CD token", ) @@ -528,8 +528,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -541,8 +541,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -557,27 +557,27 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -585,7 +585,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -593,7 +593,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -605,7 +605,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -625,15 +625,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -641,8 +641,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -650,8 +650,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -663,8 +663,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -679,28 +679,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -708,8 +708,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -717,8 +717,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -730,8 +730,8 @@ 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.zero_trust.access.service_tokens.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -746,26 +746,26 @@ 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 `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @parametrize async def test_method_refresh(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -773,7 +773,7 @@ async def test_method_refresh(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -785,7 +785,7 @@ async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None @parametrize async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -800,20 +800,20 @@ async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) - async def test_path_params_refresh(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.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.refresh( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) @@ -821,7 +821,7 @@ async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -833,7 +833,7 @@ async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -848,12 +848,12 @@ async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> async def test_path_params_rotate(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.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.rotate( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index 23d8586efca..95c8a925393 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -74,7 +74,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -83,7 +83,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -94,7 +94,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -107,7 +107,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) as response: @@ -123,14 +123,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="", name="engineers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): client.zero_trust.access.tags.with_raw_response.update( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -176,7 +176,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) @@ -184,7 +184,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -196,7 +196,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -211,20 +211,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): client.zero_trust.access.tags.with_raw_response.delete( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Tag], tag, path=["response"]) @@ -232,7 +232,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -244,7 +244,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -259,13 +259,13 @@ 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.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): client.zero_trust.access.tags.with_raw_response.get( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -328,7 +328,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -337,7 +337,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -348,7 +348,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -361,7 +361,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) as response: @@ -377,14 +377,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="", name="engineers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.update( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -430,7 +430,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) @@ -438,7 +438,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -450,7 +450,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -465,20 +465,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.delete( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Tag], tag, path=["response"]) @@ -486,7 +486,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -498,7 +498,7 @@ 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.zero_trust.access.tags.with_streaming_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -513,12 +513,12 @@ 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.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.get( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py index 55ae6bab3de..e0f1db9ea66 100644 --- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py +++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py @@ -21,7 +21,7 @@ class TestActiveSessions: @parametrize def test_method_list(self, client: Cloudflare) -> None: active_session = client.zero_trust.access.users.active_sessions.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.users.active_sessions.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -56,20 +56,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: active_session = client.zero_trust.access.users.active_sessions.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -78,7 +78,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -91,7 +91,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.users.active_sessions.with_streaming_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -107,21 +107,21 @@ 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.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `nonce` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.get( - "", + nonce="", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -133,7 +133,7 @@ class TestAsyncActiveSessions: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: active_session = await async_client.zero_trust.access.users.active_sessions.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @@ -141,7 +141,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -153,7 +153,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.active_sessions.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -168,20 +168,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: active_session = await async_client.zero_trust.access.users.active_sessions.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -190,7 +190,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -203,7 +203,7 @@ 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.zero_trust.access.users.active_sessions.with_streaming_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -219,21 +219,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.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `nonce` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( - "", + nonce="", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) diff --git a/tests/api_resources/zero_trust/access/users/test_failed_logins.py b/tests/api_resources/zero_trust/access/users/test_failed_logins.py index d2280ea6572..697dbe9181f 100644 --- a/tests/api_resources/zero_trust/access/users/test_failed_logins.py +++ b/tests/api_resources/zero_trust/access/users/test_failed_logins.py @@ -21,7 +21,7 @@ class TestFailedLogins: @parametrize def test_method_list(self, client: Cloudflare) -> None: failed_login = client.zero_trust.access.users.failed_logins.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.users.failed_logins.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -56,13 +56,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.failed_logins.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -73,7 +73,7 @@ class TestAsyncFailedLogins: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: failed_login = await async_client.zero_trust.access.users.failed_logins.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @@ -81,7 +81,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.failed_logins.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,12 +108,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.failed_logins.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py index 6363aec38d0..9b7d2644d33 100644 --- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py +++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py @@ -20,7 +20,7 @@ class TestLastSeenIdentity: @parametrize def test_method_get(self, client: Cloudflare) -> None: last_seen_identity = client.zero_trust.access.users.last_seen_identity.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.users.last_seen_identity.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncLastSeenIdentity: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: last_seen_identity = await async_client.zero_trust.access.users.last_seen_identity.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ 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.zero_trust.access.users.last_seen_identity.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/devices/policies/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/test_excludes.py index b1a2f9aa2eb..053960e74cf 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_excludes.py @@ -157,7 +157,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: exclude = client.zero_trust.devices.policies.excludes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) @@ -165,7 +165,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -177,7 +177,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.excludes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -192,13 +192,13 @@ 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.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.excludes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -341,7 +341,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: exclude = await async_client.zero_trust.devices.policies.excludes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -361,7 +361,7 @@ 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.zero_trust.devices.policies.excludes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -376,12 +376,12 @@ 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.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.excludes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py index 353bee364cd..71cf3cd9f87 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py @@ -25,7 +25,7 @@ class TestFallbackDomains: @parametrize def test_method_update(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -47,7 +47,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.fallback_domains.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) as response: @@ -63,14 +63,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -116,7 +116,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) @@ -124,7 +124,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -136,7 +136,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.fallback_domains.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -151,13 +151,13 @@ 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.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -168,7 +168,7 @@ class TestAsyncFallbackDomains: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -177,7 +177,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -190,7 +190,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.fallback_domains.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) as response: @@ -206,14 +206,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -259,7 +259,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) @@ -267,7 +267,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -279,7 +279,7 @@ 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.zero_trust.devices.policies.fallback_domains.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -294,12 +294,12 @@ 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.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/policies/test_includes.py b/tests/api_resources/zero_trust/devices/policies/test_includes.py index 76833b163c9..e858168766f 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_includes.py @@ -157,7 +157,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: include = client.zero_trust.devices.policies.includes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) @@ -165,7 +165,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -177,7 +177,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.includes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -192,13 +192,13 @@ 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.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.includes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -341,7 +341,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: include = await async_client.zero_trust.devices.policies.includes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -361,7 +361,7 @@ 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.zero_trust.devices.policies.includes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -376,12 +376,12 @@ 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.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.includes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py index eda7def2266..6ad1c0fabd0 100644 --- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py @@ -152,7 +152,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) @@ -160,7 +160,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -172,7 +172,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -187,20 +187,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -208,7 +208,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "api_url": "https://as123.awmdm.com/API", @@ -225,7 +225,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -237,7 +237,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -252,20 +252,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -273,7 +273,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -285,7 +285,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -300,13 +300,13 @@ 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.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.get( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -445,7 +445,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) @@ -453,7 +453,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -465,7 +465,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -480,20 +480,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -501,7 +501,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "api_url": "https://as123.awmdm.com/API", @@ -518,7 +518,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -530,7 +530,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -545,20 +545,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -566,7 +566,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -578,7 +578,7 @@ 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.zero_trust.devices.posture.integrations.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -593,12 +593,12 @@ 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.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.get( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py index 314ea6a8316..8fca61704e4 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -48,18 +48,18 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -112,7 +112,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -124,7 +124,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={ "host": "https://dash.cloudflare.com", @@ -138,18 +138,18 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -159,7 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -175,7 +175,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -194,7 +194,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", data={}, enabled=True, @@ -204,7 +204,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.update( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -253,7 +253,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) @@ -261,7 +261,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -273,7 +273,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -288,20 +288,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.delete( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) @@ -309,7 +309,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -321,7 +321,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -336,13 +336,13 @@ 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.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.get( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -377,18 +377,18 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -441,7 +441,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -453,7 +453,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={ "host": "https://dash.cloudflare.com", @@ -467,18 +467,18 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -488,7 +488,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -504,7 +504,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -523,7 +523,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", data={}, enabled=True, @@ -533,7 +533,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.update( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -582,7 +582,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) @@ -590,7 +590,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -602,7 +602,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -617,20 +617,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.delete( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) @@ -638,7 +638,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -650,7 +650,7 @@ 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.zero_trust.devices.dex_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -665,12 +665,12 @@ 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.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.get( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py index 0b6ac3bd334..3d6c9bacbe1 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -87,7 +87,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -95,7 +95,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "sha256": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c", @@ -109,7 +109,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -121,7 +121,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -136,13 +136,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.update( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -187,7 +187,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) @@ -195,7 +195,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -207,7 +207,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -222,20 +222,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.delete( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -243,7 +243,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -255,7 +255,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -270,13 +270,13 @@ 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.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.get( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -350,7 +350,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -358,7 +358,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "sha256": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c", @@ -372,7 +372,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -384,7 +384,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -399,13 +399,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.update( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -450,7 +450,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) @@ -458,7 +458,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -470,7 +470,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -485,20 +485,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.delete( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -506,7 +506,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -518,7 +518,7 @@ 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.zero_trust.devices.networks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -533,12 +533,12 @@ 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.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.get( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_override_codes.py b/tests/api_resources/zero_trust/devices/test_override_codes.py index c7ee58f5b0d..263f3c9c113 100644 --- a/tests/api_resources/zero_trust/devices/test_override_codes.py +++ b/tests/api_resources/zero_trust/devices/test_override_codes.py @@ -20,7 +20,7 @@ class TestOverrideCodes: @parametrize def test_method_list(self, client: Cloudflare) -> None: override_code = client.zero_trust.devices.override_codes.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) @@ -28,7 +28,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -40,7 +40,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.override_codes.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): client.zero_trust.devices.override_codes.with_raw_response.list( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -72,7 +72,7 @@ class TestAsyncOverrideCodes: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: override_code = await async_client.zero_trust.devices.override_codes.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -92,7 +92,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.override_codes.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): await async_client.zero_trust.devices.override_codes.with_raw_response.list( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_policies.py b/tests/api_resources/zero_trust/devices/test_policies.py index 0261a6987c7..2e93c0f2870 100644 --- a/tests/api_resources/zero_trust/devices/test_policies.py +++ b/tests/api_resources/zero_trust/devices/test_policies.py @@ -144,7 +144,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -152,7 +152,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -164,7 +164,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -179,13 +179,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.delete( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -193,7 +193,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -202,7 +202,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", allow_mode_switch=True, allow_updates=True, @@ -229,7 +229,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -242,7 +242,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -258,13 +258,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.edit( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -272,7 +272,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -281,7 +281,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -294,7 +294,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -310,13 +310,13 @@ 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.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -447,7 +447,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -455,7 +455,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -467,7 +467,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -482,13 +482,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.delete( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -496,7 +496,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -505,7 +505,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", allow_mode_switch=True, allow_updates=True, @@ -532,7 +532,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -545,7 +545,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -561,13 +561,13 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.edit( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -575,7 +575,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -584,7 +584,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -597,7 +597,7 @@ 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.zero_trust.devices.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -613,12 +613,12 @@ 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.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py index 7f171f6c382..7470b1a4cba 100644 --- a/tests/api_resources/zero_trust/devices/test_posture.py +++ b/tests/api_resources/zero_trust/devices/test_posture.py @@ -90,7 +90,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -100,7 +100,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -121,7 +121,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -135,7 +135,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -152,7 +152,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", type="file", @@ -160,7 +160,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -207,7 +207,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) @@ -215,7 +215,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -227,7 +227,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -242,20 +242,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) @@ -263,7 +263,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -275,7 +275,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -290,13 +290,13 @@ 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.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -373,7 +373,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -383,7 +383,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -404,7 +404,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -418,7 +418,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -435,7 +435,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", type="file", @@ -443,7 +443,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -490,7 +490,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) @@ -498,7 +498,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -510,7 +510,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -525,20 +525,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) @@ -546,7 +546,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -558,7 +558,7 @@ 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.zero_trust.devices.posture.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -573,12 +573,12 @@ 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.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py index 73561c37fb5..c2f629b06be 100644 --- a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py +++ b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py @@ -20,7 +20,7 @@ class TestPercentiles: @parametrize def test_method_get(self, client: Cloudflare) -> None: percentile = client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -30,11 +30,11 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: percentile = client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) @@ -42,7 +42,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -56,7 +56,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.http_tests.percentiles.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -73,7 +73,7 @@ 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.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -81,7 +81,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -94,7 +94,7 @@ class TestAsyncPercentiles: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: percentile = await async_client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -104,11 +104,11 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: percentile = await async_client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) @@ -116,7 +116,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -130,7 +130,7 @@ 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.zero_trust.dex.http_tests.percentiles.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -147,7 +147,7 @@ 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.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -155,7 +155,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py index 2b038de5a40..22013108b00 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -20,7 +20,7 @@ class TestHTTPTests: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_test = client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -31,12 +31,12 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_test = client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -44,7 +44,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -59,7 +59,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.http_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -77,7 +77,7 @@ 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.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -86,7 +86,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.http_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -100,7 +100,7 @@ class TestAsyncHTTPTests: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_test = await async_client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -111,12 +111,12 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_test = await async_client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -124,7 +124,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -139,7 +139,7 @@ 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.zero_trust.dex.http_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -157,7 +157,7 @@ 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.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -166,7 +166,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.http_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", diff --git a/tests/api_resources/zero_trust/dex/test_tests.py b/tests/api_resources/zero_trust/dex/test_tests.py index 71f56cc7e84..70da26054c3 100644 --- a/tests/api_resources/zero_trust/dex/test_tests.py +++ b/tests/api_resources/zero_trust/dex/test_tests.py @@ -29,11 +29,11 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: test = client.zero_trust.dex.tests.list( account_id="01a7362d577a6c3019a474fd6f485823", - colo="string", + colo="colo", device_id=["string", "string", "string"], page=1, per_page=1, - test_name="string", + test_name="testName", ) assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"]) @@ -83,11 +83,11 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.zero_trust.dex.tests.list( account_id="01a7362d577a6c3019a474fd6f485823", - colo="string", + colo="colo", device_id=["string", "string", "string"], page=1, per_page=1, - test_name="string", + test_name="testName", ) assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"]) diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py index a5a47a30db8..a324201b35f 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -24,7 +24,7 @@ class TestTracerouteTests: @parametrize def test_method_get(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -35,12 +35,12 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -48,7 +48,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -63,7 +63,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -81,7 +81,7 @@ 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.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -90,7 +90,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -100,9 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: @parametrize def test_method_network_path(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -112,9 +112,9 @@ def test_method_network_path(self, client: Cloudflare) -> None: @parametrize def test_raw_response_network_path(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -128,9 +128,9 @@ def test_raw_response_network_path(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_network_path(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -147,9 +147,9 @@ def test_streaming_response_network_path(self, client: Cloudflare) -> None: def test_path_params_network_path(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -157,9 +157,9 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -168,7 +168,7 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: @parametrize def test_method_percentiles(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -178,11 +178,11 @@ def test_method_percentiles(self, client: Cloudflare) -> None: @parametrize def test_method_percentiles_with_all_params(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) @@ -190,7 +190,7 @@ def test_method_percentiles_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_percentiles(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -204,7 +204,7 @@ def test_raw_response_percentiles(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_percentiles(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -221,7 +221,7 @@ def test_streaming_response_percentiles(self, client: Cloudflare) -> None: def test_path_params_percentiles(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -229,7 +229,7 @@ def test_path_params_percentiles(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -242,7 +242,7 @@ class TestAsyncTracerouteTests: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -253,12 +253,12 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -266,7 +266,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -281,7 +281,7 @@ 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.zero_trust.dex.traceroute_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -299,7 +299,7 @@ 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.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -308,7 +308,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -318,9 +318,9 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -330,9 +330,9 @@ async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -346,9 +346,9 @@ async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> @parametrize async def test_streaming_response_network_path(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -365,9 +365,9 @@ async def test_streaming_response_network_path(self, async_client: AsyncCloudfla async def test_path_params_network_path(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.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -375,9 +375,9 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -386,7 +386,7 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_percentiles(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -396,11 +396,11 @@ async def test_method_percentiles(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_percentiles_with_all_params(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) @@ -408,7 +408,7 @@ async def test_method_percentiles_with_all_params(self, async_client: AsyncCloud @parametrize async def test_raw_response_percentiles(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -422,7 +422,7 @@ async def test_raw_response_percentiles(self, async_client: AsyncCloudflare) -> @parametrize async def test_streaming_response_percentiles(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -439,7 +439,7 @@ async def test_streaming_response_percentiles(self, async_client: AsyncCloudflar async def test_path_params_percentiles(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.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -447,7 +447,7 @@ async def test_path_params_percentiles(self, async_client: AsyncCloudflare) -> N with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", diff --git a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py index 849b8c5cc07..73c1aa94ebf 100644 --- a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py +++ b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py @@ -29,7 +29,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: unique_device = client.zero_trust.dex.tests.unique_devices.list( account_id="01a7362d577a6c3019a474fd6f485823", device_id=["string", "string", "string"], - test_name="string", + test_name="testName", ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) unique_device = await async_client.zero_trust.dex.tests.unique_devices.list( account_id="01a7362d577a6c3019a474fd6f485823", device_id=["string", "string", "string"], - test_name="string", + test_name="testName", ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) diff --git a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py index 0a12a7ccea1..cde7d16b706 100644 --- a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py +++ b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py @@ -20,7 +20,7 @@ class TestNetworkPath: @parametrize def test_method_get(self, client: Cloudflare) -> None: network_path = client.zero_trust.dex.traceroute_test_results.network_path.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_test_results.network_path.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_result_id` but received ''"): client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "", + test_result_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -72,7 +72,7 @@ class TestAsyncNetworkPath: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: network_path = await async_client.zero_trust.dex.traceroute_test_results.network_path.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -92,7 +92,7 @@ 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.zero_trust.dex.traceroute_test_results.network_path.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_result_id` but received ''"): await async_client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "", + test_result_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py index 625c13ce809..4521acb1e12 100644 --- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py @@ -21,16 +21,16 @@ class TestUpload: @parametrize def test_method_create(self, client: Cloudflare) -> None: upload = client.zero_trust.dlp.datasets.upload.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[NewVersion], upload, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -41,8 +41,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.upload.with_streaming_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,24 +56,24 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: upload = client.zero_trust.dlp.datasets.upload.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert_matches_type(Optional[Dataset], upload, path=["response"]) @@ -81,10 +81,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert response.is_closed is True @@ -96,10 +96,10 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.upload.with_streaming_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,18 +114,18 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, + version=0, account_id="", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="", - body="string", + body="body", ) @@ -135,16 +135,16 @@ class TestAsyncUpload: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: upload = await async_client.zero_trust.dlp.datasets.upload.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[NewVersion], upload, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -155,8 +155,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.upload.with_streaming_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -170,24 +170,24 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: upload = await async_client.zero_trust.dlp.datasets.upload.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert_matches_type(Optional[Dataset], upload, path=["response"]) @@ -195,10 +195,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert response.is_closed is True @@ -210,10 +210,10 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.upload.with_streaming_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,16 +228,16 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, + version=0, account_id="", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="", - body="string", + body="body", ) diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py index fdf6e69b362..9ecae87e3a0 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py @@ -66,7 +66,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -74,7 +74,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -120,7 +120,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -147,20 +147,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomDeleteResponse, custom, path=["response"]) @@ -168,7 +168,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -180,7 +180,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -195,20 +195,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -216,7 +216,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -228,7 +228,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -243,13 +243,13 @@ 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.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -302,7 +302,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -310,7 +310,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -356,7 +356,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -368,7 +368,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -383,20 +383,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomDeleteResponse, custom, path=["response"]) @@ -404,7 +404,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -416,7 +416,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -431,20 +431,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -452,7 +452,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -464,7 +464,7 @@ 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.zero_trust.dlp.profiles.custom.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -479,12 +479,12 @@ 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.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index b8209257160..922235bf6ec 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -20,7 +20,7 @@ class TestPredefined: @parametrize def test_method_update(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -28,7 +28,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -43,7 +43,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -55,7 +55,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.predefined.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -70,20 +70,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -91,7 +91,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -103,7 +103,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.predefined.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -118,13 +118,13 @@ 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.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -135,7 +135,7 @@ class TestAsyncPredefined: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -143,7 +143,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -158,7 +158,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -170,7 +170,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -185,20 +185,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -206,7 +206,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -218,7 +218,7 @@ 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.zero_trust.dlp.profiles.predefined.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -233,12 +233,12 @@ 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.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py index 1e41d7f1260..a2f374f281f 100644 --- a/tests/api_resources/zero_trust/dlp/test_datasets.py +++ b/tests/api_resources/zero_trust/dlp/test_datasets.py @@ -21,17 +21,17 @@ class TestDatasets: @parametrize def test_method_create(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", - description="string", + account_id="account_id", + name="name", + description="description", secret=True, ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @@ -39,8 +39,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert response.is_closed is True @@ -51,8 +51,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,32 +67,32 @@ 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.dlp.datasets.with_raw_response.create( account_id="", - name="string", + name="name", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", - description="string", - name="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + description="description", + name="name", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -103,8 +103,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -118,27 +118,27 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.update( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Dataset], dataset, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -149,7 +149,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -169,16 +169,16 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert dataset is None @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -189,8 +189,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,29 +204,29 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.delete( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -237,8 +237,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -252,14 +252,14 @@ 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.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @@ -269,17 +269,17 @@ class TestAsyncDatasets: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", - description="string", + account_id="account_id", + name="name", + description="description", secret=True, ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @@ -287,8 +287,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert response.is_closed is True @@ -299,8 +299,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -315,32 +315,32 @@ 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.dlp.datasets.with_raw_response.create( account_id="", - name="string", + name="name", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", - description="string", - name="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + description="description", + name="name", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -351,8 +351,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -366,27 +366,27 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.update( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Dataset], dataset, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -397,7 +397,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -417,16 +417,16 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert dataset is None @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -437,8 +437,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -452,29 +452,29 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.delete( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -485,8 +485,8 @@ 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.zero_trust.dlp.datasets.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -500,12 +500,12 @@ 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.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/dlp/test_profiles.py b/tests/api_resources/zero_trust/dlp/test_profiles.py index 5984f84df7c..6747a23a14c 100644 --- a/tests/api_resources/zero_trust/dlp/test_profiles.py +++ b/tests/api_resources/zero_trust/dlp/test_profiles.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: profile = client.zero_trust.dlp.profiles.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -94,13 +94,13 @@ 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.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: profile = await async_client.zero_trust.dlp.profiles.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) @@ -157,7 +157,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -169,7 +169,7 @@ 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.zero_trust.dlp.profiles.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -184,12 +184,12 @@ 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.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/gateway/lists/test_items.py b/tests/api_resources/zero_trust/gateway/lists/test_items.py index 776794c88f4..9fcc52d42a2 100644 --- a/tests/api_resources/zero_trust/gateway/lists/test_items.py +++ b/tests/api_resources/zero_trust/gateway/lists/test_items.py @@ -21,7 +21,7 @@ class TestItems: @parametrize def test_method_list(self, client: Cloudflare) -> None: item = client.zero_trust.gateway.lists.items.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(SyncSinglePage[ItemListResponse], item, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.items.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -56,13 +56,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: 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.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.items.with_raw_response.list( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -73,7 +73,7 @@ class TestAsyncItems: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: item = await async_client.zero_trust.gateway.lists.items.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(AsyncSinglePage[ItemListResponse], item, path=["response"]) @@ -81,7 +81,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -93,7 +93,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.items.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -108,12 +108,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N 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.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.items.with_raw_response.list( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_certificates.py b/tests/api_resources/zero_trust/gateway/test_certificates.py index c84aaa00883..9d608b63c19 100644 --- a/tests/api_resources/zero_trust/gateway/test_certificates.py +++ b/tests/api_resources/zero_trust/gateway/test_certificates.py @@ -110,7 +110,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.zero_trust.gateway.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -130,7 +130,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -145,20 +145,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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", + certificate_id="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( - "", + certificate_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.zero_trust.gateway.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -166,7 +166,7 @@ def test_method_get(self, client: Cloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -178,7 +178,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ 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.zero_trust.gateway.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="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( - "", + certificate_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -294,7 +294,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -302,7 +302,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -314,7 +314,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -329,20 +329,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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", + certificate_id="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( - "", + certificate_id="", 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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -350,7 +350,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @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", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -362,7 +362,7 @@ 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.zero_trust.gateway.certificates.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -377,12 +377,12 @@ 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.zero_trust.gateway.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="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( - "", + certificate_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index 795445ac228..797541e090e 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -40,12 +40,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", @@ -123,12 +123,12 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", @@ -248,12 +248,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", @@ -331,12 +331,12 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index 08692169cfc..e549fedeff9 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -99,7 +99,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", description="The serial numbers for administrators", @@ -118,7 +118,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -131,7 +131,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) as response: @@ -147,14 +147,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.update( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -208,7 +208,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -216,7 +216,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -228,7 +228,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -243,20 +243,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.delete( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -264,7 +264,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", append=[ { @@ -290,7 +290,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -302,7 +302,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -317,20 +317,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.edit( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -338,7 +338,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -350,7 +350,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -365,13 +365,13 @@ 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.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.get( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -455,7 +455,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -464,7 +464,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", description="The serial numbers for administrators", @@ -474,7 +474,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -487,7 +487,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) as response: @@ -503,14 +503,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.update( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -564,7 +564,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -572,7 +572,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -584,7 +584,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -599,20 +599,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.delete( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -620,7 +620,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", append=[ { @@ -646,7 +646,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -658,7 +658,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -673,20 +673,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.edit( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -694,7 +694,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -706,7 +706,7 @@ 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.zero_trust.gateway.lists.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -721,12 +721,12 @@ 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.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.get( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py index 6051b87485f..9cc5069d7ef 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -86,7 +86,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, @@ -98,7 +98,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -111,7 +111,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) as response: @@ -127,14 +127,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", name="Austin Office Location", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.update( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -180,7 +180,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) @@ -188,7 +188,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -200,7 +200,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -215,20 +215,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.delete( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Location], location, path=["response"]) @@ -236,7 +236,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -248,7 +248,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -263,13 +263,13 @@ 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.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.get( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -333,7 +333,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -342,7 +342,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, @@ -354,7 +354,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -367,7 +367,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) as response: @@ -383,14 +383,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", name="Austin Office Location", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.update( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -436,7 +436,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) @@ -444,7 +444,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -456,7 +456,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -471,20 +471,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.delete( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Location], location, path=["response"]) @@ -492,7 +492,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -504,7 +504,7 @@ 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.zero_trust.gateway.locations.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -519,12 +519,12 @@ 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.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.get( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py index 2d5b505ed3c..07750823931 100644 --- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py +++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py @@ -108,7 +108,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) @@ -116,7 +116,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -128,7 +128,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -143,20 +143,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) @@ -164,7 +164,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ips=["192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"], name="Devops team", @@ -174,7 +174,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -186,7 +186,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -201,20 +201,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointGetResponse], proxy_endpoint, path=["response"]) @@ -222,7 +222,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -234,7 +234,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -249,13 +249,13 @@ 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.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -350,7 +350,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) @@ -358,7 +358,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -370,7 +370,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -385,20 +385,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ips=["192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"], name="Devops team", @@ -416,7 +416,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -428,7 +428,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -443,20 +443,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointGetResponse], proxy_endpoint, path=["response"]) @@ -464,7 +464,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -476,7 +476,7 @@ 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.zero_trust.gateway.proxy_endpoints.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -491,12 +491,12 @@ 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.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index 924ce1fa37b..c0aa119c722 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -120,8 +120,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -183,7 +183,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -193,7 +193,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -281,8 +281,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -307,7 +307,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -321,7 +321,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -338,7 +338,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", action="allow", name="block bad websites", @@ -346,7 +346,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -393,7 +393,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) @@ -401,7 +401,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -413,7 +413,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -428,20 +428,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) @@ -449,7 +449,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -461,7 +461,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -476,13 +476,13 @@ 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.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -589,8 +589,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -652,7 +652,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -662,7 +662,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -750,8 +750,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -776,7 +776,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -790,7 +790,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -807,7 +807,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", action="allow", name="block bad websites", @@ -815,7 +815,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -862,7 +862,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) @@ -870,7 +870,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -882,7 +882,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -897,20 +897,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) @@ -918,7 +918,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -930,7 +930,7 @@ 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.zero_trust.gateway.rules.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -945,12 +945,12 @@ 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.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/routes/test_ips.py b/tests/api_resources/zero_trust/networks/routes/test_ips.py index c21dd1b14b1..2f78627ef93 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_ips.py +++ b/tests/api_resources/zero_trust/networks/routes/test_ips.py @@ -20,7 +20,7 @@ class TestIPs: @parametrize def test_method_get(self, client: Cloudflare) -> None: ip = client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Teamnet, ip, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip = client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) @@ -49,7 +49,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.ips.with_streaming_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -64,13 +64,13 @@ 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.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip` but received ''"): client.zero_trust.networks.routes.ips.with_raw_response.get( - "", + ip="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -81,7 +81,7 @@ class TestAsyncIPs: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip = await async_client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Teamnet, ip, path=["response"]) @@ -89,7 +89,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -98,7 +98,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) @@ -110,7 +110,7 @@ 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.zero_trust.networks.routes.ips.with_streaming_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -125,12 +125,12 @@ 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.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip` but received ''"): await async_client.zero_trust.networks.routes.ips.with_raw_response.get( - "", + ip="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py index e00d2809cc0..484c99fdd33 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_networks.py +++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py @@ -20,7 +20,7 @@ class TestNetworks: @parametrize def test_method_create(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -65,20 +65,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.create( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -86,7 +86,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", tun_type="cfd_tunnel", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -97,7 +97,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -109,7 +109,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -124,20 +124,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.delete( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -145,7 +145,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -157,7 +157,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -172,13 +172,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.edit( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -189,7 +189,7 @@ class TestAsyncNetworks: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -197,7 +197,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -207,7 +207,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -219,7 +219,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -234,20 +234,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.create( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -255,7 +255,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", tun_type="cfd_tunnel", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -266,7 +266,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -278,7 +278,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -293,20 +293,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.delete( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -314,7 +314,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -326,7 +326,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -341,12 +341,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.edit( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py index 8406fdd7204..be4aa81b146 100644 --- a/tests/api_resources/zero_trust/networks/test_routes.py +++ b/tests/api_resources/zero_trust/networks/test_routes.py @@ -133,7 +133,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -141,7 +141,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -153,7 +153,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -168,20 +168,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.zero_trust.networks.routes.with_raw_response.delete( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -189,7 +189,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", network="172.16.0.0/16", @@ -200,7 +200,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -212,7 +212,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -227,13 +227,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.zero_trust.networks.routes.with_raw_response.edit( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -352,7 +352,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -360,7 +360,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -372,7 +372,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -387,20 +387,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): await async_client.zero_trust.networks.routes.with_raw_response.delete( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -408,7 +408,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", network="172.16.0.0/16", @@ -419,7 +419,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -431,7 +431,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -446,12 +446,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): await async_client.zero_trust.networks.routes.with_raw_response.edit( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/test_virtual_networks.py b/tests/api_resources/zero_trust/networks/test_virtual_networks.py index 3bb59293bd8..14297d4757a 100644 --- a/tests/api_resources/zero_trust/networks/test_virtual_networks.py +++ b/tests/api_resources/zero_trust/networks/test_virtual_networks.py @@ -127,7 +127,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) @@ -135,7 +135,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -147,7 +147,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -162,20 +162,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) @@ -183,7 +183,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Staging VPC for data science", is_default_network=True, @@ -194,7 +194,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -206,7 +206,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -221,13 +221,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -339,7 +339,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) @@ -347,7 +347,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -359,7 +359,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -374,20 +374,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) @@ -395,7 +395,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Staging VPC for data science", is_default_network=True, @@ -406,7 +406,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -418,7 +418,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -433,12 +433,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py index 6f7e3ae07d5..3e0087721b2 100644 --- a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py +++ b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py @@ -20,16 +20,16 @@ class TestReferences: @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.zero_trust.risk_scoring.integrations.references.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert response.is_closed is True @@ -40,8 +40,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.references.with_streaming_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -55,14 +55,14 @@ 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.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", + reference_id="reference_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `reference_id` but received ''"): client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "", - account_id="string", + reference_id="", + account_id="account_id", ) @@ -72,16 +72,16 @@ class TestAsyncReferences: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.zero_trust.risk_scoring.integrations.references.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert response.is_closed is True @@ -92,8 +92,8 @@ 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.zero_trust.risk_scoring.integrations.references.with_streaming_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -107,12 +107,12 @@ 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.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", + reference_id="reference_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `reference_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "", - account_id="string", + reference_id="", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py index f9d0bf7503f..fdc54e04cdd 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py @@ -23,14 +23,14 @@ class TestBehaviours: @parametrize def test_method_update(self, client: Cloudflare) -> None: behaviour = client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: behaviour = client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", behaviors={ "foo": { "enabled": True, @@ -43,7 +43,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -54,7 +54,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.behaviours.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,7 +68,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "", + account_identifier="", ) @parametrize @@ -116,14 +116,14 @@ class TestAsyncBehaviours: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: behaviour = await async_client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: behaviour = await async_client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", behaviors={ "foo": { "enabled": True, @@ -136,7 +136,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.behaviours.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,7 +161,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "", + account_identifier="", ) @parametrize diff --git a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py index c6fa43d9486..5ec6ae4e5ba 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py @@ -26,7 +26,7 @@ class TestIntegrations: @parametrize def test_method_create(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -35,17 +35,17 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -58,7 +58,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) as response: @@ -82,8 +82,8 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -92,19 +92,19 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -117,8 +117,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) as response: @@ -134,7 +134,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", active=True, tenant_url="https://example.com", @@ -142,8 +142,8 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "", - account_id="string", + integration_id="", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -152,7 +152,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[IntegrationListResponse], integration, path=["response"]) @@ -160,7 +160,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -172,7 +172,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -193,16 +193,16 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(object, integration, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -213,8 +213,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,29 +228,29 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "", - account_id="string", + integration_id="", + account_id="account_id", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -261,8 +261,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -276,14 +276,14 @@ 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.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "", - account_id="string", + integration_id="", + account_id="account_id", ) @@ -293,7 +293,7 @@ class TestAsyncIntegrations: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -302,17 +302,17 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -325,7 +325,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) as response: @@ -349,8 +349,8 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -359,19 +359,19 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -384,8 +384,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) as response: @@ -401,7 +401,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", active=True, tenant_url="https://example.com", @@ -409,8 +409,8 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "", - account_id="string", + integration_id="", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -419,7 +419,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[IntegrationListResponse], integration, path=["response"]) @@ -427,7 +427,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -439,7 +439,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -460,16 +460,16 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(object, integration, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -480,8 +480,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -495,29 +495,29 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "", - account_id="string", + integration_id="", + account_id="account_id", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -528,8 +528,8 @@ 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.zero_trust.risk_scoring.integrations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -543,12 +543,12 @@ 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.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "", - account_id="string", + integration_id="", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/risk_scoring/test_summary.py b/tests/api_resources/zero_trust/risk_scoring/test_summary.py index 1ae273a5a8c..3ac6e4d59a1 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_summary.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_summary.py @@ -20,14 +20,14 @@ class TestSummary: @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", page=0, @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.summary.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -49,7 +49,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.summary.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -63,7 +63,7 @@ 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_identifier` but received ''"): client.zero_trust.risk_scoring.summary.with_raw_response.get( - "", + account_identifier="", ) @@ -73,14 +73,14 @@ class TestAsyncSummary: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", page=0, @@ -91,7 +91,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.summary.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -102,7 +102,7 @@ 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.zero_trust.risk_scoring.summary.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -116,5 +116,5 @@ 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_identifier` but received ''"): await async_client.zero_trust.risk_scoring.summary.with_raw_response.get( - "", + account_identifier="", ) diff --git a/tests/api_resources/zero_trust/test_devices.py b/tests/api_resources/zero_trust/test_devices.py index 6b0adb03848..f814c7c80bc 100644 --- a/tests/api_resources/zero_trust/test_devices.py +++ b/tests/api_resources/zero_trust/test_devices.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: device = client.zero_trust.devices.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(DeviceGetResponse, device, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -94,13 +94,13 @@ 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.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): client.zero_trust.devices.with_raw_response.get( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -149,7 +149,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.devices.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(DeviceGetResponse, device, path=["response"]) @@ -157,7 +157,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -169,7 +169,7 @@ 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.zero_trust.devices.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -184,12 +184,12 @@ 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.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): await async_client.zero_trust.devices.with_raw_response.get( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index 60410f707a6..c31274cd210 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -29,7 +29,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -49,13 +49,13 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -68,7 +68,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -83,7 +83,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -109,7 +109,7 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -119,7 +119,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -137,13 +137,13 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -156,7 +156,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -171,7 +171,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,7 +197,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -207,7 +207,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -221,13 +221,13 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -240,7 +240,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -255,7 +255,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -281,7 +281,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -291,7 +291,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -305,13 +305,13 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -324,7 +324,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -339,7 +339,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,7 +365,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -375,7 +375,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -391,13 +391,13 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -410,7 +410,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -425,7 +425,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -451,7 +451,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -461,7 +461,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -478,13 +478,13 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -497,7 +497,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -512,7 +512,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -538,7 +538,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -548,7 +548,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -562,13 +562,13 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -581,7 +581,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -596,7 +596,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -622,7 +622,7 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -632,7 +632,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -652,13 +652,13 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -671,7 +671,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -686,7 +686,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -712,7 +712,7 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -722,7 +722,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -740,13 +740,13 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -759,7 +759,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -774,7 +774,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -800,7 +800,7 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -810,7 +810,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -827,13 +827,13 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -846,7 +846,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -861,7 +861,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -887,7 +887,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -897,7 +897,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -914,13 +914,13 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -933,7 +933,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -948,7 +948,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -974,7 +974,7 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -984,7 +984,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -997,16 +997,16 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -1016,13 +1016,13 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1035,7 +1035,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1050,7 +1050,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1076,7 +1076,7 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -1086,7 +1086,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1100,13 +1100,13 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1119,7 +1119,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1134,7 +1134,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1160,7 +1160,7 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -1170,7 +1170,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1181,13 +1181,13 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1200,7 +1200,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1215,7 +1215,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1241,18 +1241,18 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1260,7 +1260,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1273,13 +1273,13 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1289,11 +1289,11 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1305,11 +1305,11 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1324,16 +1324,16 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1342,22 +1342,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1365,7 +1365,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1376,13 +1376,13 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1392,11 +1392,11 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1408,11 +1408,11 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1427,16 +1427,16 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1445,22 +1445,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1468,20 +1468,20 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1491,11 +1491,11 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1507,11 +1507,11 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1526,16 +1526,16 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1544,22 +1544,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1567,20 +1567,20 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1590,11 +1590,11 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1606,11 +1606,11 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1625,16 +1625,16 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1643,22 +1643,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1666,7 +1666,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1675,13 +1675,13 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1691,11 +1691,11 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1707,11 +1707,11 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1726,16 +1726,16 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1744,22 +1744,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1767,7 +1767,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1777,13 +1777,13 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1793,11 +1793,11 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1809,11 +1809,11 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1828,16 +1828,16 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1846,22 +1846,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1869,20 +1869,20 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1892,11 +1892,11 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1908,11 +1908,11 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1927,16 +1927,16 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1945,22 +1945,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1968,7 +1968,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1981,13 +1981,13 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1997,11 +1997,11 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2013,11 +2013,11 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2032,16 +2032,16 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2050,22 +2050,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2073,7 +2073,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -2084,13 +2084,13 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2100,11 +2100,11 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2116,11 +2116,11 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2135,16 +2135,16 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2153,22 +2153,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2176,7 +2176,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -2186,13 +2186,13 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2202,11 +2202,11 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2218,11 +2218,11 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2237,16 +2237,16 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2255,22 +2255,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2278,7 +2278,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -2288,13 +2288,13 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2304,11 +2304,11 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2320,11 +2320,11 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2339,16 +2339,16 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2357,22 +2357,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2380,22 +2380,22 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "attributes": ["group", "department_code", "divison"], "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -2405,13 +2405,13 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2421,11 +2421,11 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2437,11 +2437,11 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2456,16 +2456,16 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2474,22 +2474,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2497,20 +2497,20 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2520,11 +2520,11 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2536,11 +2536,11 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2555,16 +2555,16 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2573,22 +2573,22 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2596,17 +2596,17 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2616,11 +2616,11 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2632,11 +2632,11 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2651,16 +2651,16 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2669,18 +2669,18 @@ 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 ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -2688,7 +2688,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -2696,7 +2696,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2708,7 +2708,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2728,15 +2728,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -2744,8 +2744,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -2753,8 +2753,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -2766,8 +2766,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2782,28 +2782,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2811,8 +2811,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2820,8 +2820,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -2833,8 +2833,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2849,20 +2849,20 @@ 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 `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -2876,7 +2876,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2896,13 +2896,13 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2915,7 +2915,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2930,7 +2930,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2956,7 +2956,7 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -2966,7 +2966,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2984,13 +2984,13 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3003,7 +3003,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3018,7 +3018,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3044,7 +3044,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3054,7 +3054,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3068,13 +3068,13 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3087,7 +3087,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3102,7 +3102,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3128,7 +3128,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3138,7 +3138,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3152,13 +3152,13 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3171,7 +3171,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3186,7 +3186,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3212,7 +3212,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3222,7 +3222,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3238,13 +3238,13 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3257,7 +3257,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3272,7 +3272,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3298,7 +3298,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3308,7 +3308,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3325,13 +3325,13 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3344,7 +3344,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3359,7 +3359,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3385,7 +3385,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3395,7 +3395,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3409,13 +3409,13 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3428,7 +3428,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3443,7 +3443,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3469,7 +3469,7 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3479,7 +3479,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3499,13 +3499,13 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3518,7 +3518,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3533,7 +3533,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3559,7 +3559,7 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3569,7 +3569,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3587,13 +3587,13 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3606,7 +3606,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3621,7 +3621,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3647,7 +3647,7 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3657,7 +3657,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3674,13 +3674,13 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3693,7 +3693,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3708,7 +3708,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3734,7 +3734,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3744,7 +3744,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3761,13 +3761,13 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3780,7 +3780,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3795,7 +3795,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3821,7 +3821,7 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3831,7 +3831,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3844,16 +3844,16 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -3863,13 +3863,13 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3882,7 +3882,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3897,7 +3897,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3923,7 +3923,7 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3933,7 +3933,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3947,13 +3947,13 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3966,7 +3966,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3981,7 +3981,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4007,7 +4007,7 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -4017,7 +4017,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4028,13 +4028,13 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4047,7 +4047,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4062,7 +4062,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4088,18 +4088,18 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4107,7 +4107,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4120,13 +4120,13 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4136,11 +4136,11 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4152,11 +4152,11 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4171,16 +4171,16 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4189,22 +4189,22 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4212,7 +4212,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4223,13 +4223,13 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4239,11 +4239,11 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4255,11 +4255,11 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4274,16 +4274,16 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4292,22 +4292,22 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4315,20 +4315,20 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4338,11 +4338,11 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4354,11 +4354,11 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4373,16 +4373,16 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4391,22 +4391,22 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4414,20 +4414,20 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4437,11 +4437,11 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4453,11 +4453,11 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4472,16 +4472,16 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4490,22 +4490,22 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4513,7 +4513,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4522,13 +4522,13 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4538,11 +4538,11 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4554,11 +4554,11 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4573,16 +4573,16 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4591,22 +4591,22 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4614,7 +4614,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4624,13 +4624,13 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4640,11 +4640,11 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4656,11 +4656,11 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4675,16 +4675,16 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4693,22 +4693,22 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4716,20 +4716,20 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4739,11 +4739,11 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4755,11 +4755,11 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4774,16 +4774,16 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4792,22 +4792,22 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4815,7 +4815,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4828,13 +4828,13 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4844,11 +4844,11 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4860,11 +4860,11 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4879,16 +4879,16 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4897,22 +4897,22 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4920,7 +4920,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4931,13 +4931,13 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4947,11 +4947,11 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4963,11 +4963,11 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4982,16 +4982,16 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5000,22 +5000,22 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5023,7 +5023,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -5033,13 +5033,13 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5049,11 +5049,11 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy @parametrize async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5065,11 +5065,11 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5084,16 +5084,16 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5102,22 +5102,22 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5125,7 +5125,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -5135,13 +5135,13 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5151,11 +5151,11 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy @parametrize async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5167,11 +5167,11 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5186,16 +5186,16 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5204,22 +5204,22 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5227,22 +5227,22 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "attributes": ["group", "department_code", "divison"], "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -5252,13 +5252,13 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5268,11 +5268,11 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy @parametrize async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5284,11 +5284,11 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5303,16 +5303,16 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5321,22 +5321,22 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5344,20 +5344,20 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5367,11 +5367,11 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy @parametrize async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5383,11 +5383,11 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5402,16 +5402,16 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5420,22 +5420,22 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5443,17 +5443,17 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5463,11 +5463,11 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy @parametrize async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5479,11 +5479,11 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5498,16 +5498,16 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5516,18 +5516,18 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -5535,7 +5535,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -5543,7 +5543,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5555,7 +5555,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5575,15 +5575,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -5591,8 +5591,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -5600,8 +5600,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -5613,8 +5613,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5629,28 +5629,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5658,8 +5658,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5667,8 +5667,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -5680,8 +5680,8 @@ 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.zero_trust.identity_providers.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5696,18 +5696,18 @@ 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 `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py index ef9c6c862c3..949d07f5e7e 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -36,7 +36,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -60,7 +60,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -74,7 +74,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,14 +98,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -113,7 +113,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -141,7 +141,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -153,7 +153,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.update( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -173,14 +173,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -188,7 +188,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -196,7 +196,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -208,7 +208,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,7 +228,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -236,7 +236,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: def test_method_revoke_users(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -245,7 +245,7 @@ def test_method_revoke_users(self, client: Cloudflare) -> None: def test_method_revoke_users_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -254,7 +254,7 @@ def test_method_revoke_users_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_revoke_users(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -267,7 +267,7 @@ def test_raw_response_revoke_users(self, client: Cloudflare) -> None: def test_streaming_response_revoke_users(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -289,7 +289,7 @@ def test_path_params_revoke_users(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) @@ -302,7 +302,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -312,7 +312,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare organization = await async_client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -336,7 +336,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -350,7 +350,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.organizations.with_streaming_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -374,14 +374,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -389,7 +389,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -417,7 +417,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -429,7 +429,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.update( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -449,14 +449,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -464,7 +464,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -472,7 +472,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -484,7 +484,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -504,7 +504,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -512,7 +512,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: async def test_method_revoke_users(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -521,7 +521,7 @@ async def test_method_revoke_users(self, async_client: AsyncCloudflare) -> None: async def test_method_revoke_users_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -530,7 +530,7 @@ async def test_method_revoke_users_with_all_params(self, async_client: AsyncClou async def test_raw_response_revoke_users(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -543,7 +543,7 @@ async def test_raw_response_revoke_users(self, async_client: AsyncCloudflare) -> async def test_streaming_response_revoke_users(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -565,5 +565,5 @@ async def test_path_params_revoke_users(self, async_client: AsyncCloudflare) -> with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/test_risk_scoring.py b/tests/api_resources/zero_trust/test_risk_scoring.py index 7e5ce3f6646..bb96f170413 100644 --- a/tests/api_resources/zero_trust/test_risk_scoring.py +++ b/tests/api_resources/zero_trust/test_risk_scoring.py @@ -20,7 +20,7 @@ class TestRiskScoring: @parametrize def test_method_get(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", @@ -40,7 +40,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.with_streaming_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,20 +67,20 @@ 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_identifier` but received ''"): client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.risk_scoring.with_raw_response.get( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_reset(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) @@ -88,7 +88,7 @@ def test_method_reset(self, client: Cloudflare) -> None: @parametrize def test_raw_response_reset(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_raw_response_reset(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_reset(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.with_streaming_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -115,13 +115,13 @@ def test_streaming_response_reset(self, client: Cloudflare) -> None: def test_path_params_reset(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.risk_scoring.with_raw_response.reset( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ class TestAsyncRiskScoring: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) @@ -140,7 +140,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", @@ -152,7 +152,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -164,7 +164,7 @@ 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.zero_trust.risk_scoring.with_streaming_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -179,20 +179,20 @@ 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_identifier` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.get( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_reset(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) @@ -200,7 +200,7 @@ async def test_method_reset(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_reset(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -212,7 +212,7 @@ async def test_raw_response_reset(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_reset(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.with_streaming_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -227,12 +227,12 @@ async def test_streaming_response_reset(self, async_client: AsyncCloudflare) -> async def test_path_params_reset(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.reset( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py index c00bfff850e..80415ba60bf 100644 --- a/tests/api_resources/zero_trust/test_tunnels.py +++ b/tests/api_resources/zero_trust/test_tunnels.py @@ -131,7 +131,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) @@ -139,7 +139,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -151,7 +151,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -166,20 +166,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) @@ -187,7 +187,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -197,7 +197,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -209,7 +209,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -224,20 +224,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) @@ -245,7 +245,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -257,7 +257,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -272,13 +272,13 @@ 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.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -412,7 +412,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -427,20 +427,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) @@ -448,7 +448,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -458,7 +458,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -470,7 +470,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -485,20 +485,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) @@ -506,7 +506,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -518,7 +518,7 @@ 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.zero_trust.tunnels.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -533,12 +533,12 @@ 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.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_configurations.py b/tests/api_resources/zero_trust/tunnels/test_configurations.py index 66e8d63db41..91d499a1045 100644 --- a/tests/api_resources/zero_trust/tunnels/test_configurations.py +++ b/tests/api_resources/zero_trust/tunnels/test_configurations.py @@ -23,7 +23,7 @@ class TestConfigurations: @parametrize def test_method_update(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) @@ -31,7 +31,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "ingress": [ @@ -41,19 +41,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -66,19 +66,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -91,19 +91,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -115,19 +115,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -139,7 +139,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -151,7 +151,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.configurations.with_streaming_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -166,20 +166,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.configurations.with_raw_response.update( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -187,7 +187,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -199,7 +199,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.configurations.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -214,13 +214,13 @@ 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.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.configurations.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -231,7 +231,7 @@ class TestAsyncConfigurations: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) @@ -239,7 +239,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "ingress": [ @@ -249,19 +249,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -274,19 +274,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -299,19 +299,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -323,19 +323,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -347,7 +347,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -359,7 +359,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.configurations.with_streaming_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -374,20 +374,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.configurations.with_raw_response.update( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -395,7 +395,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -407,7 +407,7 @@ 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.zero_trust.tunnels.configurations.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -422,12 +422,12 @@ 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.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.configurations.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_connections.py b/tests/api_resources/zero_trust/tunnels/test_connections.py index fd71588c59b..a840ee0c72a 100644 --- a/tests/api_resources/zero_trust/tunnels/test_connections.py +++ b/tests/api_resources/zero_trust/tunnels/test_connections.py @@ -20,7 +20,7 @@ class TestConnections: @parametrize def test_method_delete(self, client: Cloudflare) -> None: connection = client.zero_trust.tunnels.connections.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) @@ -28,7 +28,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -40,7 +40,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connections.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -55,20 +55,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: 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.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: connection = client.zero_trust.tunnels.connections.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) @@ -76,7 +76,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -88,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connections.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -103,13 +103,13 @@ 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.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -120,7 +120,7 @@ class TestAsyncConnections: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: connection = await async_client.zero_trust.tunnels.connections.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) @@ -128,7 +128,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -140,7 +140,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.connections.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -155,20 +155,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> 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.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connection = await async_client.zero_trust.tunnels.connections.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) @@ -176,7 +176,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -188,7 +188,7 @@ 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.zero_trust.tunnels.connections.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -203,12 +203,12 @@ 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.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_connectors.py b/tests/api_resources/zero_trust/tunnels/test_connectors.py index ffd3b01b23b..639188dd181 100644 --- a/tests/api_resources/zero_trust/tunnels/test_connectors.py +++ b/tests/api_resources/zero_trust/tunnels/test_connectors.py @@ -20,7 +20,7 @@ class TestConnectors: @parametrize def test_method_get(self, client: Cloudflare) -> None: connector = client.zero_trust.tunnels.connectors.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connectors.with_streaming_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: @@ -58,21 +58,21 @@ 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.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.zero_trust.tunnels.connectors.with_raw_response.get( - "", + connector_id="", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -84,7 +84,7 @@ class TestAsyncConnectors: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connector = await async_client.zero_trust.tunnels.connectors.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -106,7 +106,7 @@ 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.zero_trust.tunnels.connectors.with_streaming_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: @@ -122,21 +122,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.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.zero_trust.tunnels.connectors.with_raw_response.get( - "", + connector_id="", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_management.py b/tests/api_resources/zero_trust/tunnels/test_management.py index 7679e42dcb8..9bb75d7bc69 100644 --- a/tests/api_resources/zero_trust/tunnels/test_management.py +++ b/tests/api_resources/zero_trust/tunnels/test_management.py @@ -20,7 +20,7 @@ class TestManagement: @parametrize def test_method_create(self, client: Cloudflare) -> None: management = client.zero_trust.tunnels.management.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -42,7 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.management.with_streaming_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", resources=["logs"], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.management.with_raw_response.create( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -77,7 +77,7 @@ class TestAsyncManagement: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: management = await async_client.zero_trust.tunnels.management.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -86,7 +86,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -99,7 +99,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.management.with_streaming_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) as response: @@ -115,14 +115,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", resources=["logs"], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.management.with_raw_response.create( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) diff --git a/tests/api_resources/zero_trust/tunnels/test_token.py b/tests/api_resources/zero_trust/tunnels/test_token.py index 4a4ecd88189..ee47c8bf24e 100644 --- a/tests/api_resources/zero_trust/tunnels/test_token.py +++ b/tests/api_resources/zero_trust/tunnels/test_token.py @@ -20,7 +20,7 @@ class TestToken: @parametrize def test_method_get(self, client: Cloudflare) -> None: token = client.zero_trust.tunnels.token.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TokenGetResponse, token, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.token.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ 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.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.token.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -72,7 +72,7 @@ class TestAsyncToken: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: token = await async_client.zero_trust.tunnels.token.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TokenGetResponse, token, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -92,7 +92,7 @@ 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.zero_trust.tunnels.token.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ 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.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.token.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zones/test_holds.py b/tests/api_resources/zones/test_holds.py index cd4b3671938..c49066aee53 100644 --- a/tests/api_resources/zones/test_holds.py +++ b/tests/api_resources/zones/test_holds.py @@ -74,7 +74,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_method_delete_with_all_params(self, client: Cloudflare) -> None: hold = client.zones.holds.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - hold_after="string", + hold_after="hold_after", ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) @@ -208,7 +208,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: hold = await async_client.zones.holds.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - hold_after="string", + hold_after="hold_after", ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py index f8af72165ec..6a113081a1c 100644 --- a/tests/api_resources/zones/test_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -23,7 +23,7 @@ class TestSettings: @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -33,7 +33,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -47,7 +47,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -64,7 +64,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="0rtt", value="on", @@ -72,7 +72,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -81,7 +81,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -91,7 +91,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -105,7 +105,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -122,7 +122,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="advanced_ddos", value="on", @@ -130,7 +130,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -139,7 +139,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -149,7 +149,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -163,7 +163,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -180,7 +180,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_online", value="on", @@ -188,7 +188,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -197,7 +197,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -207,7 +207,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -221,7 +221,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -238,7 +238,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_use_https", value="on", @@ -246,7 +246,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -255,7 +255,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -265,7 +265,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -279,7 +279,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -296,7 +296,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_https_rewrites", value="on", @@ -304,7 +304,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -313,7 +313,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -323,7 +323,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -337,7 +337,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -354,7 +354,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="brotli", value="on", @@ -362,7 +362,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -371,7 +371,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -381,7 +381,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -395,7 +395,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -412,7 +412,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_cache_ttl", value=0, @@ -420,7 +420,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -429,7 +429,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -439,7 +439,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -453,7 +453,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -470,7 +470,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_check", value="on", @@ -478,7 +478,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -487,7 +487,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -497,7 +497,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -511,7 +511,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -528,7 +528,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cache_level", value="aggressive", @@ -536,7 +536,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -545,7 +545,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -555,7 +555,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -569,7 +569,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -586,7 +586,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="challenge_ttl", value=300, @@ -594,7 +594,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -603,7 +603,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -613,7 +613,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -627,7 +627,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -644,7 +644,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -652,7 +652,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -661,7 +661,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -671,7 +671,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -685,7 +685,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -702,7 +702,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cname_flattening", value="flatten_at_root", @@ -710,7 +710,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -719,7 +719,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -729,7 +729,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -743,7 +743,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -760,7 +760,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="development_mode", value="on", @@ -768,7 +768,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -777,7 +777,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -787,7 +787,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -801,7 +801,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -818,7 +818,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="early_hints", value="on", @@ -826,7 +826,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -835,7 +835,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -845,7 +845,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -859,7 +859,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -876,7 +876,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="edge_cache_ttl", value=30, @@ -884,7 +884,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -893,7 +893,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_16(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -903,7 +903,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -917,7 +917,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -934,7 +934,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="email_obfuscation", value="on", @@ -942,7 +942,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -951,7 +951,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_17(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -961,7 +961,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -975,7 +975,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -992,7 +992,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="h2_prioritization", value="on", @@ -1000,7 +1000,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -1009,7 +1009,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_18(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1019,7 +1019,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1033,7 +1033,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1050,7 +1050,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="hotlink_protection", value="on", @@ -1058,7 +1058,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1067,7 +1067,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_19(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1077,7 +1077,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1091,7 +1091,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1108,7 +1108,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http2", value="on", @@ -1116,7 +1116,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1125,7 +1125,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_20(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1135,7 +1135,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1149,7 +1149,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1166,7 +1166,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: 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 ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http3", value="on", @@ -1174,7 +1174,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1183,7 +1183,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_21(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1193,7 +1193,7 @@ def test_method_edit_overload_21(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1207,7 +1207,7 @@ def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1224,7 +1224,7 @@ def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None: def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="image_resizing", value="on", @@ -1232,7 +1232,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1241,7 +1241,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_22(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1251,7 +1251,7 @@ def test_method_edit_overload_22(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_22(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1265,7 +1265,7 @@ def test_raw_response_edit_overload_22(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_22(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1282,7 +1282,7 @@ def test_streaming_response_edit_overload_22(self, client: Cloudflare) -> None: def test_path_params_edit_overload_22(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ip_geolocation", value="on", @@ -1290,7 +1290,7 @@ def test_path_params_edit_overload_22(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1299,7 +1299,7 @@ def test_path_params_edit_overload_22(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_23(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1309,7 +1309,7 @@ def test_method_edit_overload_23(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_23(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1323,7 +1323,7 @@ def test_raw_response_edit_overload_23(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_23(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1340,7 +1340,7 @@ def test_streaming_response_edit_overload_23(self, client: Cloudflare) -> None: def test_path_params_edit_overload_23(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ipv6", value="on", @@ -1348,7 +1348,7 @@ def test_path_params_edit_overload_23(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1357,7 +1357,7 @@ def test_path_params_edit_overload_23(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_24(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1367,7 +1367,7 @@ def test_method_edit_overload_24(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_24(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1381,7 +1381,7 @@ def test_raw_response_edit_overload_24(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_24(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1398,7 +1398,7 @@ def test_streaming_response_edit_overload_24(self, client: Cloudflare) -> None: def test_path_params_edit_overload_24(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="max_upload", value=100, @@ -1406,7 +1406,7 @@ def test_path_params_edit_overload_24(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1415,7 +1415,7 @@ def test_path_params_edit_overload_24(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_25(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1425,7 +1425,7 @@ def test_method_edit_overload_25(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_25(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1439,7 +1439,7 @@ def test_raw_response_edit_overload_25(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_25(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1456,7 +1456,7 @@ def test_streaming_response_edit_overload_25(self, client: Cloudflare) -> None: def test_path_params_edit_overload_25(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="min_tls_version", value="1.0", @@ -1464,7 +1464,7 @@ def test_path_params_edit_overload_25(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1473,7 +1473,7 @@ def test_path_params_edit_overload_25(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_26(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1483,7 +1483,7 @@ def test_method_edit_overload_26(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_26(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={ @@ -1497,7 +1497,7 @@ def test_method_edit_with_all_params_overload_26(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_26(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1511,7 +1511,7 @@ def test_raw_response_edit_overload_26(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_26(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1528,7 +1528,7 @@ def test_streaming_response_edit_overload_26(self, client: Cloudflare) -> None: def test_path_params_edit_overload_26(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="minify", value={}, @@ -1536,7 +1536,7 @@ def test_path_params_edit_overload_26(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1545,7 +1545,7 @@ def test_path_params_edit_overload_26(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_27(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1555,7 +1555,7 @@ def test_method_edit_overload_27(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_27(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1569,7 +1569,7 @@ def test_raw_response_edit_overload_27(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_27(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1586,7 +1586,7 @@ def test_streaming_response_edit_overload_27(self, client: Cloudflare) -> None: def test_path_params_edit_overload_27(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mirage", value="on", @@ -1594,7 +1594,7 @@ def test_path_params_edit_overload_27(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1603,7 +1603,7 @@ def test_path_params_edit_overload_27(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_28(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1613,7 +1613,7 @@ def test_method_edit_overload_28(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_28(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={ @@ -1627,7 +1627,7 @@ def test_method_edit_with_all_params_overload_28(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_28(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1641,7 +1641,7 @@ def test_raw_response_edit_overload_28(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_28(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1658,7 +1658,7 @@ def test_streaming_response_edit_overload_28(self, client: Cloudflare) -> None: def test_path_params_edit_overload_28(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mobile_redirect", value={}, @@ -1666,7 +1666,7 @@ def test_path_params_edit_overload_28(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1675,7 +1675,7 @@ def test_path_params_edit_overload_28(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_29(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1685,7 +1685,7 @@ def test_method_edit_overload_29(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_29(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={"enabled": False}, @@ -1695,7 +1695,7 @@ def test_method_edit_with_all_params_overload_29(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_29(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1709,7 +1709,7 @@ def test_raw_response_edit_overload_29(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_29(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1726,7 +1726,7 @@ def test_streaming_response_edit_overload_29(self, client: Cloudflare) -> None: def test_path_params_edit_overload_29(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="nel", value={}, @@ -1734,7 +1734,7 @@ def test_path_params_edit_overload_29(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1743,7 +1743,7 @@ def test_path_params_edit_overload_29(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_30(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1753,7 +1753,7 @@ def test_method_edit_overload_30(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_30(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1767,7 +1767,7 @@ def test_raw_response_edit_overload_30(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_30(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1784,7 +1784,7 @@ def test_streaming_response_edit_overload_30(self, client: Cloudflare) -> None: def test_path_params_edit_overload_30(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_encryption", value="on", @@ -1792,7 +1792,7 @@ def test_path_params_edit_overload_30(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1801,7 +1801,7 @@ def test_path_params_edit_overload_30(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_31(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1811,7 +1811,7 @@ def test_method_edit_overload_31(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_31(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1825,7 +1825,7 @@ def test_raw_response_edit_overload_31(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_31(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1842,7 +1842,7 @@ def test_streaming_response_edit_overload_31(self, client: Cloudflare) -> None: def test_path_params_edit_overload_31(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_onion", value="on", @@ -1850,7 +1850,7 @@ def test_path_params_edit_overload_31(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1859,7 +1859,7 @@ def test_path_params_edit_overload_31(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_32(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1869,7 +1869,7 @@ def test_method_edit_overload_32(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_32(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1883,7 +1883,7 @@ def test_raw_response_edit_overload_32(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_32(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1900,7 +1900,7 @@ def test_streaming_response_edit_overload_32(self, client: Cloudflare) -> None: def test_path_params_edit_overload_32(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="orange_to_orange", value="on", @@ -1908,7 +1908,7 @@ def test_path_params_edit_overload_32(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1917,7 +1917,7 @@ def test_path_params_edit_overload_32(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_33(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1927,7 +1927,7 @@ def test_method_edit_overload_33(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_33(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1941,7 +1941,7 @@ def test_raw_response_edit_overload_33(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_33(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1958,7 +1958,7 @@ def test_streaming_response_edit_overload_33(self, client: Cloudflare) -> None: def test_path_params_edit_overload_33(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="origin_error_page_pass_thru", value="on", @@ -1966,7 +1966,7 @@ def test_path_params_edit_overload_33(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1975,7 +1975,7 @@ def test_path_params_edit_overload_33(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_34(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -1985,7 +1985,7 @@ def test_method_edit_overload_34(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_34(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -1999,7 +1999,7 @@ def test_raw_response_edit_overload_34(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_34(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -2016,7 +2016,7 @@ def test_streaming_response_edit_overload_34(self, client: Cloudflare) -> None: def test_path_params_edit_overload_34(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="polish", value="off", @@ -2024,7 +2024,7 @@ def test_path_params_edit_overload_34(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -2033,7 +2033,7 @@ def test_path_params_edit_overload_34(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_35(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2043,7 +2043,7 @@ def test_method_edit_overload_35(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_35(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2057,7 +2057,7 @@ def test_raw_response_edit_overload_35(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_35(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2074,7 +2074,7 @@ def test_streaming_response_edit_overload_35(self, client: Cloudflare) -> None: def test_path_params_edit_overload_35(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="prefetch_preload", value="on", @@ -2082,7 +2082,7 @@ def test_path_params_edit_overload_35(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2091,7 +2091,7 @@ def test_path_params_edit_overload_35(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_36(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2101,7 +2101,7 @@ def test_method_edit_overload_36(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_36(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2115,7 +2115,7 @@ def test_raw_response_edit_overload_36(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_36(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2132,7 +2132,7 @@ def test_streaming_response_edit_overload_36(self, client: Cloudflare) -> None: def test_path_params_edit_overload_36(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="proxy_read_timeout", value=0, @@ -2140,7 +2140,7 @@ def test_path_params_edit_overload_36(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2149,7 +2149,7 @@ def test_path_params_edit_overload_36(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_37(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2159,7 +2159,7 @@ def test_method_edit_overload_37(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_37(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2173,7 +2173,7 @@ def test_raw_response_edit_overload_37(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_37(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2190,7 +2190,7 @@ def test_streaming_response_edit_overload_37(self, client: Cloudflare) -> None: def test_path_params_edit_overload_37(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="pseudo_ipv4", value="off", @@ -2198,7 +2198,7 @@ def test_path_params_edit_overload_37(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2207,7 +2207,7 @@ def test_path_params_edit_overload_37(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_38(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2217,7 +2217,7 @@ def test_method_edit_overload_38(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_38(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2231,7 +2231,7 @@ def test_raw_response_edit_overload_38(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_38(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2248,7 +2248,7 @@ def test_streaming_response_edit_overload_38(self, client: Cloudflare) -> None: def test_path_params_edit_overload_38(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="replace_insecure_js", value="on", @@ -2256,7 +2256,7 @@ def test_path_params_edit_overload_38(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2265,7 +2265,7 @@ def test_path_params_edit_overload_38(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_39(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2275,7 +2275,7 @@ def test_method_edit_overload_39(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_39(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2289,7 +2289,7 @@ def test_raw_response_edit_overload_39(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_39(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2306,7 +2306,7 @@ def test_streaming_response_edit_overload_39(self, client: Cloudflare) -> None: def test_path_params_edit_overload_39(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="response_buffering", value="on", @@ -2314,7 +2314,7 @@ def test_path_params_edit_overload_39(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2323,7 +2323,7 @@ def test_path_params_edit_overload_39(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_40(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2333,7 +2333,7 @@ def test_method_edit_overload_40(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_40(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2347,7 +2347,7 @@ def test_raw_response_edit_overload_40(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_40(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2364,7 +2364,7 @@ def test_streaming_response_edit_overload_40(self, client: Cloudflare) -> None: def test_path_params_edit_overload_40(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="rocket_loader", value="on", @@ -2372,7 +2372,7 @@ def test_path_params_edit_overload_40(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2381,7 +2381,7 @@ def test_path_params_edit_overload_40(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_41(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2398,7 +2398,7 @@ def test_method_edit_overload_41(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_41(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2419,7 +2419,7 @@ def test_raw_response_edit_overload_41(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_41(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2443,7 +2443,7 @@ def test_streaming_response_edit_overload_41(self, client: Cloudflare) -> None: def test_path_params_edit_overload_41(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_platform_optimization", value={ @@ -2458,7 +2458,7 @@ def test_path_params_edit_overload_41(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2474,7 +2474,7 @@ def test_path_params_edit_overload_41(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_42(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2484,7 +2484,7 @@ def test_method_edit_overload_42(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_42(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={ @@ -2502,7 +2502,7 @@ def test_method_edit_with_all_params_overload_42(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_42(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2516,7 +2516,7 @@ def test_raw_response_edit_overload_42(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_42(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2533,7 +2533,7 @@ def test_streaming_response_edit_overload_42(self, client: Cloudflare) -> None: def test_path_params_edit_overload_42(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_header", value={}, @@ -2541,7 +2541,7 @@ def test_path_params_edit_overload_42(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2550,7 +2550,7 @@ def test_path_params_edit_overload_42(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_43(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2560,7 +2560,7 @@ def test_method_edit_overload_43(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_43(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2574,7 +2574,7 @@ def test_raw_response_edit_overload_43(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_43(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2591,7 +2591,7 @@ def test_streaming_response_edit_overload_43(self, client: Cloudflare) -> None: def test_path_params_edit_overload_43(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_level", value="off", @@ -2599,7 +2599,7 @@ def test_path_params_edit_overload_43(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2608,7 +2608,7 @@ def test_path_params_edit_overload_43(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_44(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2618,7 +2618,7 @@ def test_method_edit_overload_44(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_44(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2632,7 +2632,7 @@ def test_raw_response_edit_overload_44(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_44(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2649,7 +2649,7 @@ def test_streaming_response_edit_overload_44(self, client: Cloudflare) -> None: def test_path_params_edit_overload_44(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="server_side_exclude", value="on", @@ -2657,7 +2657,7 @@ def test_path_params_edit_overload_44(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2666,7 +2666,7 @@ def test_path_params_edit_overload_44(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_45(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2676,7 +2676,7 @@ def test_method_edit_overload_45(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_45(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2690,7 +2690,7 @@ def test_raw_response_edit_overload_45(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_45(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2707,7 +2707,7 @@ def test_streaming_response_edit_overload_45(self, client: Cloudflare) -> None: def test_path_params_edit_overload_45(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sha1_support", value="on", @@ -2715,7 +2715,7 @@ def test_path_params_edit_overload_45(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2724,7 +2724,7 @@ def test_path_params_edit_overload_45(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_46(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2734,7 +2734,7 @@ def test_method_edit_overload_46(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_46(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2748,7 +2748,7 @@ def test_raw_response_edit_overload_46(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_46(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2765,7 +2765,7 @@ def test_streaming_response_edit_overload_46(self, client: Cloudflare) -> None: def test_path_params_edit_overload_46(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sort_query_string_for_cache", value="on", @@ -2773,7 +2773,7 @@ def test_path_params_edit_overload_46(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2782,7 +2782,7 @@ def test_path_params_edit_overload_46(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_47(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2792,7 +2792,7 @@ def test_method_edit_overload_47(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_47(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2806,7 +2806,7 @@ def test_raw_response_edit_overload_47(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_47(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2823,7 +2823,7 @@ def test_streaming_response_edit_overload_47(self, client: Cloudflare) -> None: def test_path_params_edit_overload_47(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ssl", value="off", @@ -2831,7 +2831,7 @@ def test_path_params_edit_overload_47(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2840,7 +2840,7 @@ def test_path_params_edit_overload_47(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_48(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -2848,7 +2848,7 @@ def test_method_edit_overload_48(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_48(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl_recommender", enabled=True, @@ -2858,7 +2858,7 @@ def test_method_edit_with_all_params_overload_48(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_48(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -2870,7 +2870,7 @@ def test_raw_response_edit_overload_48(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_48(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -2885,20 +2885,20 @@ def test_streaming_response_edit_overload_48(self, client: Cloudflare) -> None: def test_path_params_edit_overload_48(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit_overload_49(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2908,7 +2908,7 @@ def test_method_edit_overload_49(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_49(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2922,7 +2922,7 @@ def test_raw_response_edit_overload_49(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_49(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2939,7 +2939,7 @@ def test_streaming_response_edit_overload_49(self, client: Cloudflare) -> None: def test_path_params_edit_overload_49(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_2_only", value="on", @@ -2947,7 +2947,7 @@ def test_path_params_edit_overload_49(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2956,7 +2956,7 @@ def test_path_params_edit_overload_49(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_50(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -2966,7 +2966,7 @@ def test_method_edit_overload_50(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_50(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -2980,7 +2980,7 @@ def test_raw_response_edit_overload_50(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_50(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -2997,7 +2997,7 @@ def test_streaming_response_edit_overload_50(self, client: Cloudflare) -> None: def test_path_params_edit_overload_50(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_3", value="on", @@ -3005,7 +3005,7 @@ def test_path_params_edit_overload_50(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -3014,7 +3014,7 @@ def test_path_params_edit_overload_50(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_51(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3024,7 +3024,7 @@ def test_method_edit_overload_51(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_51(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3038,7 +3038,7 @@ def test_raw_response_edit_overload_51(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_51(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3055,7 +3055,7 @@ def test_streaming_response_edit_overload_51(self, client: Cloudflare) -> None: def test_path_params_edit_overload_51(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_client_auth", value="on", @@ -3063,7 +3063,7 @@ def test_path_params_edit_overload_51(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3072,7 +3072,7 @@ def test_path_params_edit_overload_51(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_52(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3082,7 +3082,7 @@ def test_method_edit_overload_52(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_52(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3096,7 +3096,7 @@ def test_raw_response_edit_overload_52(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_52(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3113,7 +3113,7 @@ def test_streaming_response_edit_overload_52(self, client: Cloudflare) -> None: def test_path_params_edit_overload_52(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="true_client_ip_header", value="on", @@ -3121,7 +3121,7 @@ def test_path_params_edit_overload_52(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3130,7 +3130,7 @@ def test_path_params_edit_overload_52(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_53(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3140,7 +3140,7 @@ def test_method_edit_overload_53(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_53(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3154,7 +3154,7 @@ def test_raw_response_edit_overload_53(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_53(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3171,7 +3171,7 @@ def test_streaming_response_edit_overload_53(self, client: Cloudflare) -> None: def test_path_params_edit_overload_53(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="waf", value="on", @@ -3179,7 +3179,7 @@ def test_path_params_edit_overload_53(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3188,7 +3188,7 @@ def test_path_params_edit_overload_53(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_54(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3198,7 +3198,7 @@ def test_method_edit_overload_54(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_54(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3212,7 +3212,7 @@ def test_raw_response_edit_overload_54(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_54(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3229,7 +3229,7 @@ def test_streaming_response_edit_overload_54(self, client: Cloudflare) -> None: def test_path_params_edit_overload_54(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="webp", value="on", @@ -3237,7 +3237,7 @@ def test_path_params_edit_overload_54(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3246,7 +3246,7 @@ def test_path_params_edit_overload_54(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_55(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3256,7 +3256,7 @@ def test_method_edit_overload_55(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_55(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3270,7 +3270,7 @@ def test_raw_response_edit_overload_55(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_55(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3287,7 +3287,7 @@ def test_streaming_response_edit_overload_55(self, client: Cloudflare) -> None: def test_path_params_edit_overload_55(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="websockets", value="on", @@ -3295,7 +3295,7 @@ def test_path_params_edit_overload_55(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3304,7 +3304,7 @@ def test_path_params_edit_overload_55(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.zones.settings.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -3312,7 +3312,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3324,7 +3324,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -3339,13 +3339,13 @@ 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 `zone_id` but received ''"): client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.get( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3356,7 +3356,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3366,7 +3366,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3380,7 +3380,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3397,7 +3397,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="0rtt", value="on", @@ -3405,7 +3405,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3414,7 +3414,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3424,7 +3424,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3438,7 +3438,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3455,7 +3455,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="advanced_ddos", value="on", @@ -3463,7 +3463,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3472,7 +3472,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3482,7 +3482,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3496,7 +3496,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3513,7 +3513,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_online", value="on", @@ -3521,7 +3521,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3530,7 +3530,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3540,7 +3540,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3554,7 +3554,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3571,7 +3571,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_use_https", value="on", @@ -3579,7 +3579,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3588,7 +3588,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3598,7 +3598,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3612,7 +3612,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3629,7 +3629,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_https_rewrites", value="on", @@ -3637,7 +3637,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3646,7 +3646,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3656,7 +3656,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3670,7 +3670,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3687,7 +3687,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="brotli", value="on", @@ -3695,7 +3695,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3704,7 +3704,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3714,7 +3714,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3728,7 +3728,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3745,7 +3745,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_cache_ttl", value=0, @@ -3753,7 +3753,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3762,7 +3762,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3772,7 +3772,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3786,7 +3786,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3803,7 +3803,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_check", value="on", @@ -3811,7 +3811,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3820,7 +3820,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3830,7 +3830,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3844,7 +3844,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3861,7 +3861,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cache_level", value="aggressive", @@ -3869,7 +3869,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3878,7 +3878,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3888,7 +3888,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3902,7 +3902,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3919,7 +3919,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="challenge_ttl", value=300, @@ -3927,7 +3927,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3936,7 +3936,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3946,7 +3946,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3960,7 +3960,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3977,7 +3977,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3985,7 +3985,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3994,7 +3994,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4004,7 +4004,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4018,7 +4018,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4035,7 +4035,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cname_flattening", value="flatten_at_root", @@ -4043,7 +4043,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4052,7 +4052,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4062,7 +4062,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4076,7 +4076,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4093,7 +4093,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="development_mode", value="on", @@ -4101,7 +4101,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4110,7 +4110,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4120,7 +4120,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4134,7 +4134,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4151,7 +4151,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="early_hints", value="on", @@ -4159,7 +4159,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4168,7 +4168,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4178,7 +4178,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4192,7 +4192,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4209,7 +4209,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="edge_cache_ttl", value=30, @@ -4217,7 +4217,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4226,7 +4226,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4236,7 +4236,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4250,7 +4250,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4267,7 +4267,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="email_obfuscation", value="on", @@ -4275,7 +4275,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4284,7 +4284,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4294,7 +4294,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4308,7 +4308,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4325,7 +4325,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="h2_prioritization", value="on", @@ -4333,7 +4333,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4342,7 +4342,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4352,7 +4352,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4366,7 +4366,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4383,7 +4383,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="hotlink_protection", value="on", @@ -4391,7 +4391,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4400,7 +4400,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4410,7 +4410,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4424,7 +4424,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4441,7 +4441,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http2", value="on", @@ -4449,7 +4449,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4458,7 +4458,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4468,7 +4468,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4482,7 +4482,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4499,7 +4499,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou 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 ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http3", value="on", @@ -4507,7 +4507,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4516,7 +4516,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4526,7 +4526,7 @@ async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4540,7 +4540,7 @@ async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_21(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4557,7 +4557,7 @@ async def test_streaming_response_edit_overload_21(self, async_client: AsyncClou async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="image_resizing", value="on", @@ -4565,7 +4565,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4574,7 +4574,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_22(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4584,7 +4584,7 @@ async def test_method_edit_overload_22(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_22(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4598,7 +4598,7 @@ async def test_raw_response_edit_overload_22(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_22(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4615,7 +4615,7 @@ async def test_streaming_response_edit_overload_22(self, async_client: AsyncClou async def test_path_params_edit_overload_22(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ip_geolocation", value="on", @@ -4623,7 +4623,7 @@ async def test_path_params_edit_overload_22(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4632,7 +4632,7 @@ async def test_path_params_edit_overload_22(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_23(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4642,7 +4642,7 @@ async def test_method_edit_overload_23(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_23(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4656,7 +4656,7 @@ async def test_raw_response_edit_overload_23(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_23(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4673,7 +4673,7 @@ async def test_streaming_response_edit_overload_23(self, async_client: AsyncClou async def test_path_params_edit_overload_23(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ipv6", value="on", @@ -4681,7 +4681,7 @@ async def test_path_params_edit_overload_23(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4690,7 +4690,7 @@ async def test_path_params_edit_overload_23(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_24(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4700,7 +4700,7 @@ async def test_method_edit_overload_24(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_24(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4714,7 +4714,7 @@ async def test_raw_response_edit_overload_24(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_24(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4731,7 +4731,7 @@ async def test_streaming_response_edit_overload_24(self, async_client: AsyncClou async def test_path_params_edit_overload_24(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="max_upload", value=100, @@ -4739,7 +4739,7 @@ async def test_path_params_edit_overload_24(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4748,7 +4748,7 @@ async def test_path_params_edit_overload_24(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_25(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4758,7 +4758,7 @@ async def test_method_edit_overload_25(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_25(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4772,7 +4772,7 @@ async def test_raw_response_edit_overload_25(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_25(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4789,7 +4789,7 @@ async def test_streaming_response_edit_overload_25(self, async_client: AsyncClou async def test_path_params_edit_overload_25(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="min_tls_version", value="1.0", @@ -4797,7 +4797,7 @@ async def test_path_params_edit_overload_25(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4806,7 +4806,7 @@ async def test_path_params_edit_overload_25(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_26(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4816,7 +4816,7 @@ async def test_method_edit_overload_26(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_26(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={ @@ -4830,7 +4830,7 @@ async def test_method_edit_with_all_params_overload_26(self, async_client: Async @parametrize async def test_raw_response_edit_overload_26(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4844,7 +4844,7 @@ async def test_raw_response_edit_overload_26(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_26(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4861,7 +4861,7 @@ async def test_streaming_response_edit_overload_26(self, async_client: AsyncClou async def test_path_params_edit_overload_26(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="minify", value={}, @@ -4869,7 +4869,7 @@ async def test_path_params_edit_overload_26(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4878,7 +4878,7 @@ async def test_path_params_edit_overload_26(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_27(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4888,7 +4888,7 @@ async def test_method_edit_overload_27(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_27(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4902,7 +4902,7 @@ async def test_raw_response_edit_overload_27(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_27(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4919,7 +4919,7 @@ async def test_streaming_response_edit_overload_27(self, async_client: AsyncClou async def test_path_params_edit_overload_27(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mirage", value="on", @@ -4927,7 +4927,7 @@ async def test_path_params_edit_overload_27(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4936,7 +4936,7 @@ async def test_path_params_edit_overload_27(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_28(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -4946,7 +4946,7 @@ async def test_method_edit_overload_28(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_28(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={ @@ -4960,7 +4960,7 @@ async def test_method_edit_with_all_params_overload_28(self, async_client: Async @parametrize async def test_raw_response_edit_overload_28(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -4974,7 +4974,7 @@ async def test_raw_response_edit_overload_28(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_28(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -4991,7 +4991,7 @@ async def test_streaming_response_edit_overload_28(self, async_client: AsyncClou async def test_path_params_edit_overload_28(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mobile_redirect", value={}, @@ -4999,7 +4999,7 @@ async def test_path_params_edit_overload_28(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -5008,7 +5008,7 @@ async def test_path_params_edit_overload_28(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_29(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5018,7 +5018,7 @@ async def test_method_edit_overload_29(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_29(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={"enabled": False}, @@ -5028,7 +5028,7 @@ async def test_method_edit_with_all_params_overload_29(self, async_client: Async @parametrize async def test_raw_response_edit_overload_29(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5042,7 +5042,7 @@ async def test_raw_response_edit_overload_29(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_29(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5059,7 +5059,7 @@ async def test_streaming_response_edit_overload_29(self, async_client: AsyncClou async def test_path_params_edit_overload_29(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="nel", value={}, @@ -5067,7 +5067,7 @@ async def test_path_params_edit_overload_29(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5076,7 +5076,7 @@ async def test_path_params_edit_overload_29(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_30(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5086,7 +5086,7 @@ async def test_method_edit_overload_30(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_30(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5100,7 +5100,7 @@ async def test_raw_response_edit_overload_30(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_30(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5117,7 +5117,7 @@ async def test_streaming_response_edit_overload_30(self, async_client: AsyncClou async def test_path_params_edit_overload_30(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_encryption", value="on", @@ -5125,7 +5125,7 @@ async def test_path_params_edit_overload_30(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5134,7 +5134,7 @@ async def test_path_params_edit_overload_30(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_31(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5144,7 +5144,7 @@ async def test_method_edit_overload_31(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_31(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5158,7 +5158,7 @@ async def test_raw_response_edit_overload_31(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_31(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5175,7 +5175,7 @@ async def test_streaming_response_edit_overload_31(self, async_client: AsyncClou async def test_path_params_edit_overload_31(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_onion", value="on", @@ -5183,7 +5183,7 @@ async def test_path_params_edit_overload_31(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5192,7 +5192,7 @@ async def test_path_params_edit_overload_31(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_32(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5202,7 +5202,7 @@ async def test_method_edit_overload_32(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_32(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5216,7 +5216,7 @@ async def test_raw_response_edit_overload_32(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_32(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5233,7 +5233,7 @@ async def test_streaming_response_edit_overload_32(self, async_client: AsyncClou async def test_path_params_edit_overload_32(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="orange_to_orange", value="on", @@ -5241,7 +5241,7 @@ async def test_path_params_edit_overload_32(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5250,7 +5250,7 @@ async def test_path_params_edit_overload_32(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_33(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5260,7 +5260,7 @@ async def test_method_edit_overload_33(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_33(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5274,7 +5274,7 @@ async def test_raw_response_edit_overload_33(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_33(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5291,7 +5291,7 @@ async def test_streaming_response_edit_overload_33(self, async_client: AsyncClou async def test_path_params_edit_overload_33(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="origin_error_page_pass_thru", value="on", @@ -5299,7 +5299,7 @@ async def test_path_params_edit_overload_33(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5308,7 +5308,7 @@ async def test_path_params_edit_overload_33(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_34(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5318,7 +5318,7 @@ async def test_method_edit_overload_34(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_34(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5332,7 +5332,7 @@ async def test_raw_response_edit_overload_34(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_34(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5349,7 +5349,7 @@ async def test_streaming_response_edit_overload_34(self, async_client: AsyncClou async def test_path_params_edit_overload_34(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="polish", value="off", @@ -5357,7 +5357,7 @@ async def test_path_params_edit_overload_34(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5366,7 +5366,7 @@ async def test_path_params_edit_overload_34(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_35(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5376,7 +5376,7 @@ async def test_method_edit_overload_35(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_35(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5390,7 +5390,7 @@ async def test_raw_response_edit_overload_35(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_35(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5407,7 +5407,7 @@ async def test_streaming_response_edit_overload_35(self, async_client: AsyncClou async def test_path_params_edit_overload_35(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="prefetch_preload", value="on", @@ -5415,7 +5415,7 @@ async def test_path_params_edit_overload_35(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5424,7 +5424,7 @@ async def test_path_params_edit_overload_35(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_36(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5434,7 +5434,7 @@ async def test_method_edit_overload_36(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_36(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5448,7 +5448,7 @@ async def test_raw_response_edit_overload_36(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_36(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5465,7 +5465,7 @@ async def test_streaming_response_edit_overload_36(self, async_client: AsyncClou async def test_path_params_edit_overload_36(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="proxy_read_timeout", value=0, @@ -5473,7 +5473,7 @@ async def test_path_params_edit_overload_36(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5482,7 +5482,7 @@ async def test_path_params_edit_overload_36(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_37(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5492,7 +5492,7 @@ async def test_method_edit_overload_37(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_37(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5506,7 +5506,7 @@ async def test_raw_response_edit_overload_37(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_37(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5523,7 +5523,7 @@ async def test_streaming_response_edit_overload_37(self, async_client: AsyncClou async def test_path_params_edit_overload_37(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="pseudo_ipv4", value="off", @@ -5531,7 +5531,7 @@ async def test_path_params_edit_overload_37(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5540,7 +5540,7 @@ async def test_path_params_edit_overload_37(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_38(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5550,7 +5550,7 @@ async def test_method_edit_overload_38(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_38(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5564,7 +5564,7 @@ async def test_raw_response_edit_overload_38(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_38(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5581,7 +5581,7 @@ async def test_streaming_response_edit_overload_38(self, async_client: AsyncClou async def test_path_params_edit_overload_38(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="replace_insecure_js", value="on", @@ -5589,7 +5589,7 @@ async def test_path_params_edit_overload_38(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5598,7 +5598,7 @@ async def test_path_params_edit_overload_38(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_39(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5608,7 +5608,7 @@ async def test_method_edit_overload_39(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_39(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5622,7 +5622,7 @@ async def test_raw_response_edit_overload_39(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_39(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5639,7 +5639,7 @@ async def test_streaming_response_edit_overload_39(self, async_client: AsyncClou async def test_path_params_edit_overload_39(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="response_buffering", value="on", @@ -5647,7 +5647,7 @@ async def test_path_params_edit_overload_39(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5656,7 +5656,7 @@ async def test_path_params_edit_overload_39(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_40(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5666,7 +5666,7 @@ async def test_method_edit_overload_40(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_40(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5680,7 +5680,7 @@ async def test_raw_response_edit_overload_40(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_40(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5697,7 +5697,7 @@ async def test_streaming_response_edit_overload_40(self, async_client: AsyncClou async def test_path_params_edit_overload_40(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="rocket_loader", value="on", @@ -5705,7 +5705,7 @@ async def test_path_params_edit_overload_40(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5714,7 +5714,7 @@ async def test_path_params_edit_overload_40(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_41(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5731,7 +5731,7 @@ async def test_method_edit_overload_41(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_41(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5752,7 +5752,7 @@ async def test_raw_response_edit_overload_41(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_41(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5776,7 +5776,7 @@ async def test_streaming_response_edit_overload_41(self, async_client: AsyncClou async def test_path_params_edit_overload_41(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_platform_optimization", value={ @@ -5791,7 +5791,7 @@ async def test_path_params_edit_overload_41(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5807,7 +5807,7 @@ async def test_path_params_edit_overload_41(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_42(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5817,7 +5817,7 @@ async def test_method_edit_overload_42(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_42(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={ @@ -5835,7 +5835,7 @@ async def test_method_edit_with_all_params_overload_42(self, async_client: Async @parametrize async def test_raw_response_edit_overload_42(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5849,7 +5849,7 @@ async def test_raw_response_edit_overload_42(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_42(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5866,7 +5866,7 @@ async def test_streaming_response_edit_overload_42(self, async_client: AsyncClou async def test_path_params_edit_overload_42(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_header", value={}, @@ -5874,7 +5874,7 @@ async def test_path_params_edit_overload_42(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5883,7 +5883,7 @@ async def test_path_params_edit_overload_42(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_43(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5893,7 +5893,7 @@ async def test_method_edit_overload_43(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_43(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5907,7 +5907,7 @@ async def test_raw_response_edit_overload_43(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_43(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5924,7 +5924,7 @@ async def test_streaming_response_edit_overload_43(self, async_client: AsyncClou async def test_path_params_edit_overload_43(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_level", value="off", @@ -5932,7 +5932,7 @@ async def test_path_params_edit_overload_43(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5941,7 +5941,7 @@ async def test_path_params_edit_overload_43(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_44(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5951,7 +5951,7 @@ async def test_method_edit_overload_44(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_44(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5965,7 +5965,7 @@ async def test_raw_response_edit_overload_44(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_44(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5982,7 +5982,7 @@ async def test_streaming_response_edit_overload_44(self, async_client: AsyncClou async def test_path_params_edit_overload_44(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="server_side_exclude", value="on", @@ -5990,7 +5990,7 @@ async def test_path_params_edit_overload_44(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5999,7 +5999,7 @@ async def test_path_params_edit_overload_44(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_45(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6009,7 +6009,7 @@ async def test_method_edit_overload_45(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_45(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6023,7 +6023,7 @@ async def test_raw_response_edit_overload_45(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_45(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6040,7 +6040,7 @@ async def test_streaming_response_edit_overload_45(self, async_client: AsyncClou async def test_path_params_edit_overload_45(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sha1_support", value="on", @@ -6048,7 +6048,7 @@ async def test_path_params_edit_overload_45(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6057,7 +6057,7 @@ async def test_path_params_edit_overload_45(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_46(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6067,7 +6067,7 @@ async def test_method_edit_overload_46(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_46(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6081,7 +6081,7 @@ async def test_raw_response_edit_overload_46(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_46(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6098,7 +6098,7 @@ async def test_streaming_response_edit_overload_46(self, async_client: AsyncClou async def test_path_params_edit_overload_46(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sort_query_string_for_cache", value="on", @@ -6106,7 +6106,7 @@ async def test_path_params_edit_overload_46(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6115,7 +6115,7 @@ async def test_path_params_edit_overload_46(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_47(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6125,7 +6125,7 @@ async def test_method_edit_overload_47(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_47(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6139,7 +6139,7 @@ async def test_raw_response_edit_overload_47(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_47(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6156,7 +6156,7 @@ async def test_streaming_response_edit_overload_47(self, async_client: AsyncClou async def test_path_params_edit_overload_47(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ssl", value="off", @@ -6164,7 +6164,7 @@ async def test_path_params_edit_overload_47(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6173,7 +6173,7 @@ async def test_path_params_edit_overload_47(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_48(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -6181,7 +6181,7 @@ async def test_method_edit_overload_48(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_48(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl_recommender", enabled=True, @@ -6191,7 +6191,7 @@ async def test_method_edit_with_all_params_overload_48(self, async_client: Async @parametrize async def test_raw_response_edit_overload_48(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -6203,7 +6203,7 @@ async def test_raw_response_edit_overload_48(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_48(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -6218,20 +6218,20 @@ async def test_streaming_response_edit_overload_48(self, async_client: AsyncClou async def test_path_params_edit_overload_48(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit_overload_49(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6241,7 +6241,7 @@ async def test_method_edit_overload_49(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_49(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6255,7 +6255,7 @@ async def test_raw_response_edit_overload_49(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_49(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6272,7 +6272,7 @@ async def test_streaming_response_edit_overload_49(self, async_client: AsyncClou async def test_path_params_edit_overload_49(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_2_only", value="on", @@ -6280,7 +6280,7 @@ async def test_path_params_edit_overload_49(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6289,7 +6289,7 @@ async def test_path_params_edit_overload_49(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_50(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6299,7 +6299,7 @@ async def test_method_edit_overload_50(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_50(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6313,7 +6313,7 @@ async def test_raw_response_edit_overload_50(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_50(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6330,7 +6330,7 @@ async def test_streaming_response_edit_overload_50(self, async_client: AsyncClou async def test_path_params_edit_overload_50(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_3", value="on", @@ -6338,7 +6338,7 @@ async def test_path_params_edit_overload_50(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6347,7 +6347,7 @@ async def test_path_params_edit_overload_50(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_51(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6357,7 +6357,7 @@ async def test_method_edit_overload_51(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_51(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6371,7 +6371,7 @@ async def test_raw_response_edit_overload_51(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_51(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6388,7 +6388,7 @@ async def test_streaming_response_edit_overload_51(self, async_client: AsyncClou async def test_path_params_edit_overload_51(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_client_auth", value="on", @@ -6396,7 +6396,7 @@ async def test_path_params_edit_overload_51(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6405,7 +6405,7 @@ async def test_path_params_edit_overload_51(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_52(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6415,7 +6415,7 @@ async def test_method_edit_overload_52(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_52(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6429,7 +6429,7 @@ async def test_raw_response_edit_overload_52(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_52(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6446,7 +6446,7 @@ async def test_streaming_response_edit_overload_52(self, async_client: AsyncClou async def test_path_params_edit_overload_52(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="true_client_ip_header", value="on", @@ -6454,7 +6454,7 @@ async def test_path_params_edit_overload_52(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6463,7 +6463,7 @@ async def test_path_params_edit_overload_52(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_53(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6473,7 +6473,7 @@ async def test_method_edit_overload_53(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_53(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6487,7 +6487,7 @@ async def test_raw_response_edit_overload_53(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_53(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6504,7 +6504,7 @@ async def test_streaming_response_edit_overload_53(self, async_client: AsyncClou async def test_path_params_edit_overload_53(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="waf", value="on", @@ -6512,7 +6512,7 @@ async def test_path_params_edit_overload_53(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6521,7 +6521,7 @@ async def test_path_params_edit_overload_53(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_54(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6531,7 +6531,7 @@ async def test_method_edit_overload_54(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_54(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6545,7 +6545,7 @@ async def test_raw_response_edit_overload_54(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_54(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6562,7 +6562,7 @@ async def test_streaming_response_edit_overload_54(self, async_client: AsyncClou async def test_path_params_edit_overload_54(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="webp", value="on", @@ -6570,7 +6570,7 @@ async def test_path_params_edit_overload_54(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6579,7 +6579,7 @@ async def test_path_params_edit_overload_54(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_55(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6589,7 +6589,7 @@ async def test_method_edit_overload_55(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_55(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6603,7 +6603,7 @@ async def test_raw_response_edit_overload_55(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_55(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6620,7 +6620,7 @@ async def test_streaming_response_edit_overload_55(self, async_client: AsyncClou async def test_path_params_edit_overload_55(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="websockets", value="on", @@ -6628,7 +6628,7 @@ async def test_path_params_edit_overload_55(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6637,7 +6637,7 @@ async def test_path_params_edit_overload_55(self, async_client: AsyncCloudflare) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -6645,7 +6645,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -6657,7 +6657,7 @@ 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.zones.settings.with_streaming_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -6672,12 +6672,12 @@ 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 `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.get( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zones/test_subscriptions.py b/tests/api_resources/zones/test_subscriptions.py index 2c194b3fb30..6a6f83dc72e 100644 --- a/tests/api_resources/zones/test_subscriptions.py +++ b/tests/api_resources/zones/test_subscriptions.py @@ -22,15 +22,15 @@ class TestSubscriptions: @parametrize def test_method_create(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -68,7 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zones.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -79,7 +79,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zones.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -93,7 +93,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.zones.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize @@ -179,15 +179,15 @@ class TestAsyncSubscriptions: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -225,7 +225,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -236,7 +236,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,7 +250,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.zones.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize From c5a273734ac08b4144c3f3cf6491f8241e4ac4ba Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 16:44:21 +0000 Subject: [PATCH 233/316] 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 e1aa4a76cd9..bb1e2210796 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-df97a1ecdf7f4502a6af21fb90eec87f091b87af651521f512d16ffe58c0670b.yml From 7e830293c537f6732dae17e45738061f705749cf Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 17:04:47 +0000 Subject: [PATCH 234/316] 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 bb1e2210796..e1aa4a76cd9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-df97a1ecdf7f4502a6af21fb90eec87f091b87af651521f512d16ffe58c0670b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml From 502c98c1a1499d454f98f388e5527540f0712002 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:37:33 +0000 Subject: [PATCH 235/316] feat(api): OpenAPI spec update via Stainless API (#1179) --- .stats.yml | 2 +- src/cloudflare/resources/workers/ai/ai.py | 20 +++++++++++++++++++ src/cloudflare/types/workers/ai_run_params.py | 10 ++++++++++ tests/api_resources/workers/test_ai.py | 10 ++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e1aa4a76cd9..23bd6be1885 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index df82885c0b8..9eabaca9253 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -130,12 +130,17 @@ def run( account_id: str, prompt: str, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: 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, @@ -485,12 +490,17 @@ def run( text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: int | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, @@ -625,12 +635,17 @@ async def run( account_id: str, prompt: str, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: 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, @@ -980,12 +995,17 @@ async def run( text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: int | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 12cd367dc01..c4267b81bf5 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -42,18 +42,28 @@ class TextToImage(TypedDict, total=False): guidance: float + height: int + image: Iterable[float] + image_b64: str + lora_weights: Iterable[float] loras: List[str] mask: Iterable[float] + negative_prompt: str + num_steps: int + seed: int + strength: float + width: int + class TextEmbeddings(TypedDict, total=False): account_id: Required[str] diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index aed9946b339..538d0fb1c39 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -139,12 +139,17 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, + height=0, image=[0, 0, 0], + image_b64="image_b64", lora_weights=[0, 0, 0], loras=["string", "string", "string"], mask=[0, 0, 0], + negative_prompt="negative_prompt", num_steps=0, + seed=0, strength=0, + width=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -821,12 +826,17 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, + height=0, image=[0, 0, 0], + image_b64="image_b64", lora_weights=[0, 0, 0], loras=["string", "string", "string"], mask=[0, 0, 0], + negative_prompt="negative_prompt", num_steps=0, + seed=0, strength=0, + width=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) From 040b023072f9b261933e0ec719fe540def306324 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 19:38:52 +0000 Subject: [PATCH 236/316] 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 23bd6be1885..16d479f5054 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml From fe708458268bd1167e770658ccb1a4a1bb5078f8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 20:12:16 +0000 Subject: [PATCH 237/316] 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 16d479f5054..23bd6be1885 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 3ada1c7b2e2b51847586471734d036cabaac9837 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 20:58:30 +0000 Subject: [PATCH 238/316] 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 23bd6be1885..d2b60d24e93 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From bacd1bf46e8cf159240a1cd3590163f0858c6151 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 22:29:52 +0000 Subject: [PATCH 239/316] 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 d2b60d24e93..23bd6be1885 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 6fa02583cb95bd6797de771dc7ac82ecd022c75a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 23:27:09 +0000 Subject: [PATCH 240/316] 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 23bd6be1885..981d5a60b34 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From 03f1cd5d2303dfbfa7460086b8d027063b05aa09 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 11 Jul 2024 23:58:46 +0000 Subject: [PATCH 241/316] 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 981d5a60b34..16d479f5054 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml From d1df920f4ba8d8e8557acf250995a7f635487fd7 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 00:00:54 +0000 Subject: [PATCH 242/316] 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 16d479f5054..23bd6be1885 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From d0a6c8a7683be5b2b0110f761ad47f8fb6b7d9fc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 04:51:29 +0000 Subject: [PATCH 243/316] feat(api): update via SDK Studio (#1180) --- .stats.yml | 2 +- api.md | 31 ++ src/cloudflare/_client.py | 8 + src/cloudflare/resources/__init__.py | 14 + .../resources/cloud_connector/__init__.py | 33 ++ .../cloud_connector/cloud_connector.py | 80 ++++ .../resources/cloud_connector/rules.py | 255 ++++++++++ src/cloudflare/resources/radar/__init__.py | 14 + src/cloudflare/resources/radar/radar.py | 32 ++ .../resources/radar/tcp_resets_timeouts.py | 434 ++++++++++++++++++ .../types/cloud_connector/__init__.py | 7 + .../cloud_connector/rule_list_response.py | 29 ++ .../cloud_connector/rule_update_params.py | 37 ++ .../cloud_connector/rule_update_response.py | 32 ++ src/cloudflare/types/radar/__init__.py | 8 + .../tcp_resets_timeout_summary_params.py | 53 +++ .../tcp_resets_timeout_summary_response.py | 88 ++++ ...resets_timeout_timeseries_groups_params.py | 60 +++ ...sets_timeout_timeseries_groups_response.py | 94 ++++ .../api_resources/cloud_connector/__init__.py | 1 + .../cloud_connector/test_rules.py | 183 ++++++++ .../radar/test_tcp_resets_timeouts.py | 216 +++++++++ 22 files changed, 1710 insertions(+), 1 deletion(-) create mode 100644 src/cloudflare/resources/cloud_connector/__init__.py create mode 100644 src/cloudflare/resources/cloud_connector/cloud_connector.py create mode 100644 src/cloudflare/resources/cloud_connector/rules.py create mode 100644 src/cloudflare/resources/radar/tcp_resets_timeouts.py create mode 100644 src/cloudflare/types/cloud_connector/__init__.py create mode 100644 src/cloudflare/types/cloud_connector/rule_list_response.py create mode 100644 src/cloudflare/types/cloud_connector/rule_update_params.py create mode 100644 src/cloudflare/types/cloud_connector/rule_update_response.py create mode 100644 src/cloudflare/types/radar/tcp_resets_timeout_summary_params.py create mode 100644 src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py create mode 100644 src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_params.py create mode 100644 src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py create mode 100644 tests/api_resources/cloud_connector/__init__.py create mode 100644 tests/api_resources/cloud_connector/test_rules.py create mode 100644 tests/api_resources/radar/test_tcp_resets_timeouts.py diff --git a/.stats.yml b/.stats.yml index 23bd6be1885..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1252 +configured_endpoints: 1256 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml diff --git a/api.md b/api.md index 1945f0c0c95..f55013739bb 100644 --- a/api.md +++ b/api.md @@ -6935,6 +6935,22 @@ Methods: - client.radar.traffic_anomalies.locations.get(\*\*params) -> LocationGetResponse +## TCPResetsTimeouts + +Types: + +```python +from cloudflare.types.radar import ( + TCPResetsTimeoutSummaryResponse, + TCPResetsTimeoutTimeseriesGroupsResponse, +) +``` + +Methods: + +- client.radar.tcp_resets_timeouts.summary(\*\*params) -> TCPResetsTimeoutSummaryResponse +- client.radar.tcp_resets_timeouts.timeseries_groups(\*\*params) -> TCPResetsTimeoutTimeseriesGroupsResponse + # BotManagement Types: @@ -7312,3 +7328,18 @@ Methods: - client.iam.resource_groups.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[object] - client.iam.resource_groups.delete(resource_group_id, \*, account_id) -> Optional - client.iam.resource_groups.get(resource_group_id, \*, account_id) -> ResourceGroupGetResponse + +# CloudConnector + +## Rules + +Types: + +```python +from cloudflare.types.cloud_connector import RuleUpdateResponse, RuleListResponse +``` + +Methods: + +- client.cloud_connector.rules.update(\*, zone_id, \*\*params) -> Optional +- client.cloud_connector.rules.list(\*, zone_id) -> SyncSinglePage[RuleListResponse] diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index 4aa3abb1416..6e2928862dd 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -131,6 +131,7 @@ class Cloudflare(SyncAPIClient): event_notifications: resources.EventNotificationsResource ai_gateway: resources.AIGatewayResource iam: resources.IAMResource + cloud_connector: resources.CloudConnectorResource with_raw_response: CloudflareWithRawResponse with_streaming_response: CloudflareWithStreamedResponse @@ -290,6 +291,7 @@ def __init__( self.event_notifications = resources.EventNotificationsResource(self) self.ai_gateway = resources.AIGatewayResource(self) self.iam = resources.IAMResource(self) + self.cloud_connector = resources.CloudConnectorResource(self) self.with_raw_response = CloudflareWithRawResponse(self) self.with_streaming_response = CloudflareWithStreamedResponse(self) @@ -552,6 +554,7 @@ class AsyncCloudflare(AsyncAPIClient): event_notifications: resources.AsyncEventNotificationsResource ai_gateway: resources.AsyncAIGatewayResource iam: resources.AsyncIAMResource + cloud_connector: resources.AsyncCloudConnectorResource with_raw_response: AsyncCloudflareWithRawResponse with_streaming_response: AsyncCloudflareWithStreamedResponse @@ -711,6 +714,7 @@ def __init__( self.event_notifications = resources.AsyncEventNotificationsResource(self) self.ai_gateway = resources.AsyncAIGatewayResource(self) self.iam = resources.AsyncIAMResource(self) + self.cloud_connector = resources.AsyncCloudConnectorResource(self) self.with_raw_response = AsyncCloudflareWithRawResponse(self) self.with_streaming_response = AsyncCloudflareWithStreamedResponse(self) @@ -984,6 +988,7 @@ def __init__(self, client: Cloudflare) -> None: self.event_notifications = resources.EventNotificationsResourceWithRawResponse(client.event_notifications) self.ai_gateway = resources.AIGatewayResourceWithRawResponse(client.ai_gateway) self.iam = resources.IAMResourceWithRawResponse(client.iam) + self.cloud_connector = resources.CloudConnectorResourceWithRawResponse(client.cloud_connector) class AsyncCloudflareWithRawResponse: @@ -1086,6 +1091,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.event_notifications = resources.AsyncEventNotificationsResourceWithRawResponse(client.event_notifications) self.ai_gateway = resources.AsyncAIGatewayResourceWithRawResponse(client.ai_gateway) self.iam = resources.AsyncIAMResourceWithRawResponse(client.iam) + self.cloud_connector = resources.AsyncCloudConnectorResourceWithRawResponse(client.cloud_connector) class CloudflareWithStreamedResponse: @@ -1188,6 +1194,7 @@ def __init__(self, client: Cloudflare) -> None: self.event_notifications = resources.EventNotificationsResourceWithStreamingResponse(client.event_notifications) self.ai_gateway = resources.AIGatewayResourceWithStreamingResponse(client.ai_gateway) self.iam = resources.IAMResourceWithStreamingResponse(client.iam) + self.cloud_connector = resources.CloudConnectorResourceWithStreamingResponse(client.cloud_connector) class AsyncCloudflareWithStreamedResponse: @@ -1298,6 +1305,7 @@ def __init__(self, client: AsyncCloudflare) -> None: ) self.ai_gateway = resources.AsyncAIGatewayResourceWithStreamingResponse(client.ai_gateway) self.iam = resources.AsyncIAMResourceWithStreamingResponse(client.iam) + self.cloud_connector = resources.AsyncCloudConnectorResourceWithStreamingResponse(client.cloud_connector) Client = Cloudflare diff --git a/src/cloudflare/resources/__init__.py b/src/cloudflare/resources/__init__.py index 05545390c25..35be298a563 100644 --- a/src/cloudflare/resources/__init__.py +++ b/src/cloudflare/resources/__init__.py @@ -528,6 +528,14 @@ WARPConnectorResourceWithStreamingResponse, AsyncWARPConnectorResourceWithStreamingResponse, ) +from .cloud_connector import ( + CloudConnectorResource, + AsyncCloudConnectorResource, + CloudConnectorResourceWithRawResponse, + AsyncCloudConnectorResourceWithRawResponse, + CloudConnectorResourceWithStreamingResponse, + AsyncCloudConnectorResourceWithStreamingResponse, +) from .durable_objects import ( DurableObjectsResource, AsyncDurableObjectsResource, @@ -1178,4 +1186,10 @@ "AsyncIAMResourceWithRawResponse", "IAMResourceWithStreamingResponse", "AsyncIAMResourceWithStreamingResponse", + "CloudConnectorResource", + "AsyncCloudConnectorResource", + "CloudConnectorResourceWithRawResponse", + "AsyncCloudConnectorResourceWithRawResponse", + "CloudConnectorResourceWithStreamingResponse", + "AsyncCloudConnectorResourceWithStreamingResponse", ] diff --git a/src/cloudflare/resources/cloud_connector/__init__.py b/src/cloudflare/resources/cloud_connector/__init__.py new file mode 100644 index 00000000000..da4c14aec1c --- /dev/null +++ b/src/cloudflare/resources/cloud_connector/__init__.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .rules import ( + RulesResource, + AsyncRulesResource, + RulesResourceWithRawResponse, + AsyncRulesResourceWithRawResponse, + RulesResourceWithStreamingResponse, + AsyncRulesResourceWithStreamingResponse, +) +from .cloud_connector import ( + CloudConnectorResource, + AsyncCloudConnectorResource, + CloudConnectorResourceWithRawResponse, + AsyncCloudConnectorResourceWithRawResponse, + CloudConnectorResourceWithStreamingResponse, + AsyncCloudConnectorResourceWithStreamingResponse, +) + +__all__ = [ + "RulesResource", + "AsyncRulesResource", + "RulesResourceWithRawResponse", + "AsyncRulesResourceWithRawResponse", + "RulesResourceWithStreamingResponse", + "AsyncRulesResourceWithStreamingResponse", + "CloudConnectorResource", + "AsyncCloudConnectorResource", + "CloudConnectorResourceWithRawResponse", + "AsyncCloudConnectorResourceWithRawResponse", + "CloudConnectorResourceWithStreamingResponse", + "AsyncCloudConnectorResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/cloud_connector/cloud_connector.py b/src/cloudflare/resources/cloud_connector/cloud_connector.py new file mode 100644 index 00000000000..f95e76646df --- /dev/null +++ b/src/cloudflare/resources/cloud_connector/cloud_connector.py @@ -0,0 +1,80 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .rules import ( + RulesResource, + AsyncRulesResource, + RulesResourceWithRawResponse, + AsyncRulesResourceWithRawResponse, + RulesResourceWithStreamingResponse, + AsyncRulesResourceWithStreamingResponse, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource + +__all__ = ["CloudConnectorResource", "AsyncCloudConnectorResource"] + + +class CloudConnectorResource(SyncAPIResource): + @cached_property + def rules(self) -> RulesResource: + return RulesResource(self._client) + + @cached_property + def with_raw_response(self) -> CloudConnectorResourceWithRawResponse: + return CloudConnectorResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CloudConnectorResourceWithStreamingResponse: + return CloudConnectorResourceWithStreamingResponse(self) + + +class AsyncCloudConnectorResource(AsyncAPIResource): + @cached_property + def rules(self) -> AsyncRulesResource: + return AsyncRulesResource(self._client) + + @cached_property + def with_raw_response(self) -> AsyncCloudConnectorResourceWithRawResponse: + return AsyncCloudConnectorResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCloudConnectorResourceWithStreamingResponse: + return AsyncCloudConnectorResourceWithStreamingResponse(self) + + +class CloudConnectorResourceWithRawResponse: + def __init__(self, cloud_connector: CloudConnectorResource) -> None: + self._cloud_connector = cloud_connector + + @cached_property + def rules(self) -> RulesResourceWithRawResponse: + return RulesResourceWithRawResponse(self._cloud_connector.rules) + + +class AsyncCloudConnectorResourceWithRawResponse: + def __init__(self, cloud_connector: AsyncCloudConnectorResource) -> None: + self._cloud_connector = cloud_connector + + @cached_property + def rules(self) -> AsyncRulesResourceWithRawResponse: + return AsyncRulesResourceWithRawResponse(self._cloud_connector.rules) + + +class CloudConnectorResourceWithStreamingResponse: + def __init__(self, cloud_connector: CloudConnectorResource) -> None: + self._cloud_connector = cloud_connector + + @cached_property + def rules(self) -> RulesResourceWithStreamingResponse: + return RulesResourceWithStreamingResponse(self._cloud_connector.rules) + + +class AsyncCloudConnectorResourceWithStreamingResponse: + def __init__(self, cloud_connector: AsyncCloudConnectorResource) -> None: + self._cloud_connector = cloud_connector + + @cached_property + def rules(self) -> AsyncRulesResourceWithStreamingResponse: + return AsyncRulesResourceWithStreamingResponse(self._cloud_connector.rules) diff --git a/src/cloudflare/resources/cloud_connector/rules.py b/src/cloudflare/resources/cloud_connector/rules.py new file mode 100644 index 00000000000..0b741471554 --- /dev/null +++ b/src/cloudflare/resources/cloud_connector/rules.py @@ -0,0 +1,255 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Iterable, 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.cloud_connector import rule_update_params +from ...types.cloud_connector.rule_list_response import RuleListResponse +from ...types.cloud_connector.rule_update_response import RuleUpdateResponse + +__all__ = ["RulesResource", "AsyncRulesResource"] + + +class RulesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> RulesResourceWithRawResponse: + return RulesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> RulesResourceWithStreamingResponse: + return RulesResourceWithStreamingResponse(self) + + def update( + self, + *, + zone_id: str, + body: Iterable[rule_update_params.Body], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RuleUpdateResponse]: + """ + Put Rules + + Args: + zone_id: Identifier + + body: List of Cloud Connector rules + + 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._put( + f"/zones/{zone_id}/cloud_connector/rules", + body=maybe_transform(body, rule_update_params.RuleUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[RuleUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + ) + + def list( + self, + *, + zone_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[RuleListResponse]: + """ + Rules + + Args: + zone_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 zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + return self._get_api_list( + f"/zones/{zone_id}/cloud_connector/rules", + page=SyncSinglePage[RuleListResponse], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + model=RuleListResponse, + ) + + +class AsyncRulesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncRulesResourceWithRawResponse: + return AsyncRulesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncRulesResourceWithStreamingResponse: + return AsyncRulesResourceWithStreamingResponse(self) + + async def update( + self, + *, + zone_id: str, + body: Iterable[rule_update_params.Body], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via 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[RuleUpdateResponse]: + """ + Put Rules + + Args: + zone_id: Identifier + + body: List of Cloud Connector rules + + 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._put( + f"/zones/{zone_id}/cloud_connector/rules", + body=await async_maybe_transform(body, rule_update_params.RuleUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[RuleUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + ) + + def list( + self, + *, + zone_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[RuleListResponse, AsyncSinglePage[RuleListResponse]]: + """ + Rules + + Args: + zone_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 zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + return self._get_api_list( + f"/zones/{zone_id}/cloud_connector/rules", + page=AsyncSinglePage[RuleListResponse], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + model=RuleListResponse, + ) + + +class RulesResourceWithRawResponse: + def __init__(self, rules: RulesResource) -> None: + self._rules = rules + + self.update = to_raw_response_wrapper( + rules.update, + ) + self.list = to_raw_response_wrapper( + rules.list, + ) + + +class AsyncRulesResourceWithRawResponse: + def __init__(self, rules: AsyncRulesResource) -> None: + self._rules = rules + + self.update = async_to_raw_response_wrapper( + rules.update, + ) + self.list = async_to_raw_response_wrapper( + rules.list, + ) + + +class RulesResourceWithStreamingResponse: + def __init__(self, rules: RulesResource) -> None: + self._rules = rules + + self.update = to_streamed_response_wrapper( + rules.update, + ) + self.list = to_streamed_response_wrapper( + rules.list, + ) + + +class AsyncRulesResourceWithStreamingResponse: + def __init__(self, rules: AsyncRulesResource) -> None: + self._rules = rules + + self.update = async_to_streamed_response_wrapper( + rules.update, + ) + self.list = async_to_streamed_response_wrapper( + rules.list, + ) diff --git a/src/cloudflare/resources/radar/__init__.py b/src/cloudflare/resources/radar/__init__.py index 20485edccb2..5ea83f8d764 100644 --- a/src/cloudflare/resources/radar/__init__.py +++ b/src/cloudflare/resources/radar/__init__.py @@ -128,6 +128,14 @@ TrafficAnomaliesResourceWithStreamingResponse, AsyncTrafficAnomaliesResourceWithStreamingResponse, ) +from .tcp_resets_timeouts import ( + TCPResetsTimeoutsResource, + AsyncTCPResetsTimeoutsResource, + TCPResetsTimeoutsResourceWithRawResponse, + AsyncTCPResetsTimeoutsResourceWithRawResponse, + TCPResetsTimeoutsResourceWithStreamingResponse, + AsyncTCPResetsTimeoutsResourceWithStreamingResponse, +) __all__ = [ "AnnotationsResource", @@ -220,6 +228,12 @@ "AsyncTrafficAnomaliesResourceWithRawResponse", "TrafficAnomaliesResourceWithStreamingResponse", "AsyncTrafficAnomaliesResourceWithStreamingResponse", + "TCPResetsTimeoutsResource", + "AsyncTCPResetsTimeoutsResource", + "TCPResetsTimeoutsResourceWithRawResponse", + "AsyncTCPResetsTimeoutsResourceWithRawResponse", + "TCPResetsTimeoutsResourceWithStreamingResponse", + "AsyncTCPResetsTimeoutsResourceWithStreamingResponse", "RadarResource", "AsyncRadarResource", "RadarResourceWithRawResponse", diff --git a/src/cloudflare/resources/radar/radar.py b/src/cloudflare/resources/radar/radar.py index 29a0fd5a913..555d88e7bf5 100644 --- a/src/cloudflare/resources/radar/radar.py +++ b/src/cloudflare/resources/radar/radar.py @@ -134,6 +134,14 @@ TrafficAnomaliesResourceWithStreamingResponse, AsyncTrafficAnomaliesResourceWithStreamingResponse, ) +from .tcp_resets_timeouts import ( + TCPResetsTimeoutsResource, + AsyncTCPResetsTimeoutsResource, + TCPResetsTimeoutsResourceWithRawResponse, + AsyncTCPResetsTimeoutsResourceWithRawResponse, + TCPResetsTimeoutsResourceWithStreamingResponse, + AsyncTCPResetsTimeoutsResourceWithStreamingResponse, +) from .annotations.annotations import AnnotationsResource, AsyncAnnotationsResource from .verified_bots.verified_bots import VerifiedBotsResource, AsyncVerifiedBotsResource from .traffic_anomalies.traffic_anomalies import TrafficAnomaliesResource, AsyncTrafficAnomaliesResource @@ -202,6 +210,10 @@ def ranking(self) -> RankingResource: def traffic_anomalies(self) -> TrafficAnomaliesResource: return TrafficAnomaliesResource(self._client) + @cached_property + def tcp_resets_timeouts(self) -> TCPResetsTimeoutsResource: + return TCPResetsTimeoutsResource(self._client) + @cached_property def with_raw_response(self) -> RadarResourceWithRawResponse: return RadarResourceWithRawResponse(self) @@ -272,6 +284,10 @@ def ranking(self) -> AsyncRankingResource: def traffic_anomalies(self) -> AsyncTrafficAnomaliesResource: return AsyncTrafficAnomaliesResource(self._client) + @cached_property + def tcp_resets_timeouts(self) -> AsyncTCPResetsTimeoutsResource: + return AsyncTCPResetsTimeoutsResource(self._client) + @cached_property def with_raw_response(self) -> AsyncRadarResourceWithRawResponse: return AsyncRadarResourceWithRawResponse(self) @@ -345,6 +361,10 @@ def ranking(self) -> RankingResourceWithRawResponse: def traffic_anomalies(self) -> TrafficAnomaliesResourceWithRawResponse: return TrafficAnomaliesResourceWithRawResponse(self._radar.traffic_anomalies) + @cached_property + def tcp_resets_timeouts(self) -> TCPResetsTimeoutsResourceWithRawResponse: + return TCPResetsTimeoutsResourceWithRawResponse(self._radar.tcp_resets_timeouts) + class AsyncRadarResourceWithRawResponse: def __init__(self, radar: AsyncRadarResource) -> None: @@ -410,6 +430,10 @@ def ranking(self) -> AsyncRankingResourceWithRawResponse: def traffic_anomalies(self) -> AsyncTrafficAnomaliesResourceWithRawResponse: return AsyncTrafficAnomaliesResourceWithRawResponse(self._radar.traffic_anomalies) + @cached_property + def tcp_resets_timeouts(self) -> AsyncTCPResetsTimeoutsResourceWithRawResponse: + return AsyncTCPResetsTimeoutsResourceWithRawResponse(self._radar.tcp_resets_timeouts) + class RadarResourceWithStreamingResponse: def __init__(self, radar: RadarResource) -> None: @@ -475,6 +499,10 @@ def ranking(self) -> RankingResourceWithStreamingResponse: def traffic_anomalies(self) -> TrafficAnomaliesResourceWithStreamingResponse: return TrafficAnomaliesResourceWithStreamingResponse(self._radar.traffic_anomalies) + @cached_property + def tcp_resets_timeouts(self) -> TCPResetsTimeoutsResourceWithStreamingResponse: + return TCPResetsTimeoutsResourceWithStreamingResponse(self._radar.tcp_resets_timeouts) + class AsyncRadarResourceWithStreamingResponse: def __init__(self, radar: AsyncRadarResource) -> None: @@ -539,3 +567,7 @@ def ranking(self) -> AsyncRankingResourceWithStreamingResponse: @cached_property def traffic_anomalies(self) -> AsyncTrafficAnomaliesResourceWithStreamingResponse: return AsyncTrafficAnomaliesResourceWithStreamingResponse(self._radar.traffic_anomalies) + + @cached_property + def tcp_resets_timeouts(self) -> AsyncTCPResetsTimeoutsResourceWithStreamingResponse: + return AsyncTCPResetsTimeoutsResourceWithStreamingResponse(self._radar.tcp_resets_timeouts) diff --git a/src/cloudflare/resources/radar/tcp_resets_timeouts.py b/src/cloudflare/resources/radar/tcp_resets_timeouts.py new file mode 100644 index 00000000000..1a87837a3af --- /dev/null +++ b/src/cloudflare/resources/radar/tcp_resets_timeouts.py @@ -0,0 +1,434 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Type, Union, cast +from datetime import datetime +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 ..._wrappers import ResultWrapper +from ...types.radar import tcp_resets_timeout_summary_params, tcp_resets_timeout_timeseries_groups_params +from ..._base_client import make_request_options +from ...types.radar.tcp_resets_timeout_summary_response import TCPResetsTimeoutSummaryResponse +from ...types.radar.tcp_resets_timeout_timeseries_groups_response import TCPResetsTimeoutTimeseriesGroupsResponse + +__all__ = ["TCPResetsTimeoutsResource", "AsyncTCPResetsTimeoutsResource"] + + +class TCPResetsTimeoutsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> TCPResetsTimeoutsResourceWithRawResponse: + return TCPResetsTimeoutsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> TCPResetsTimeoutsResourceWithStreamingResponse: + return TCPResetsTimeoutsResourceWithStreamingResponse(self) + + def summary( + self, + *, + asn: List[str] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> TCPResetsTimeoutSummaryResponse: + """ + Percentage distribution by connection stage of TCP connections terminated within + the first 10 packets by a reset or timeout, for a given time period. + + Args: + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + format: Format results are returned in. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + 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 + """ + return self._get( + "/radar/tcp_resets_timeouts/summary", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "asn": asn, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + tcp_resets_timeout_summary_params.TCPResetsTimeoutSummaryParams, + ), + post_parser=ResultWrapper[TCPResetsTimeoutSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[TCPResetsTimeoutSummaryResponse], ResultWrapper[TCPResetsTimeoutSummaryResponse]), + ) + + def timeseries_groups( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> TCPResetsTimeoutTimeseriesGroupsResponse: + """ + Percentage distribution by connection stage of TCP connections terminated within + the first 10 packets by a reset or timeout, over time. + + Args: + agg_interval: Aggregation interval results should be returned in (for example, in 15 minutes + or 1 hour intervals). Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + format: Format results are returned in. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + 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 + """ + return self._get( + "/radar/tcp_resets_timeouts/timeseries_groups", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + tcp_resets_timeout_timeseries_groups_params.TCPResetsTimeoutTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[TCPResetsTimeoutTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast( + Type[TCPResetsTimeoutTimeseriesGroupsResponse], ResultWrapper[TCPResetsTimeoutTimeseriesGroupsResponse] + ), + ) + + +class AsyncTCPResetsTimeoutsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncTCPResetsTimeoutsResourceWithRawResponse: + return AsyncTCPResetsTimeoutsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncTCPResetsTimeoutsResourceWithStreamingResponse: + return AsyncTCPResetsTimeoutsResourceWithStreamingResponse(self) + + async def summary( + self, + *, + asn: List[str] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> TCPResetsTimeoutSummaryResponse: + """ + Percentage distribution by connection stage of TCP connections terminated within + the first 10 packets by a reset or timeout, for a given time period. + + Args: + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + format: Format results are returned in. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + 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 + """ + return await self._get( + "/radar/tcp_resets_timeouts/summary", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "asn": asn, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + tcp_resets_timeout_summary_params.TCPResetsTimeoutSummaryParams, + ), + post_parser=ResultWrapper[TCPResetsTimeoutSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[TCPResetsTimeoutSummaryResponse], ResultWrapper[TCPResetsTimeoutSummaryResponse]), + ) + + async def timeseries_groups( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> TCPResetsTimeoutTimeseriesGroupsResponse: + """ + Percentage distribution by connection stage of TCP connections terminated within + the first 10 packets by a reset or timeout, over time. + + Args: + agg_interval: Aggregation interval results should be returned in (for example, in 15 minutes + or 1 hour intervals). Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + format: Format results are returned in. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + 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 + """ + return await self._get( + "/radar/tcp_resets_timeouts/timeseries_groups", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + tcp_resets_timeout_timeseries_groups_params.TCPResetsTimeoutTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[TCPResetsTimeoutTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast( + Type[TCPResetsTimeoutTimeseriesGroupsResponse], ResultWrapper[TCPResetsTimeoutTimeseriesGroupsResponse] + ), + ) + + +class TCPResetsTimeoutsResourceWithRawResponse: + def __init__(self, tcp_resets_timeouts: TCPResetsTimeoutsResource) -> None: + self._tcp_resets_timeouts = tcp_resets_timeouts + + self.summary = to_raw_response_wrapper( + tcp_resets_timeouts.summary, + ) + self.timeseries_groups = to_raw_response_wrapper( + tcp_resets_timeouts.timeseries_groups, + ) + + +class AsyncTCPResetsTimeoutsResourceWithRawResponse: + def __init__(self, tcp_resets_timeouts: AsyncTCPResetsTimeoutsResource) -> None: + self._tcp_resets_timeouts = tcp_resets_timeouts + + self.summary = async_to_raw_response_wrapper( + tcp_resets_timeouts.summary, + ) + self.timeseries_groups = async_to_raw_response_wrapper( + tcp_resets_timeouts.timeseries_groups, + ) + + +class TCPResetsTimeoutsResourceWithStreamingResponse: + def __init__(self, tcp_resets_timeouts: TCPResetsTimeoutsResource) -> None: + self._tcp_resets_timeouts = tcp_resets_timeouts + + self.summary = to_streamed_response_wrapper( + tcp_resets_timeouts.summary, + ) + self.timeseries_groups = to_streamed_response_wrapper( + tcp_resets_timeouts.timeseries_groups, + ) + + +class AsyncTCPResetsTimeoutsResourceWithStreamingResponse: + def __init__(self, tcp_resets_timeouts: AsyncTCPResetsTimeoutsResource) -> None: + self._tcp_resets_timeouts = tcp_resets_timeouts + + self.summary = async_to_streamed_response_wrapper( + tcp_resets_timeouts.summary, + ) + self.timeseries_groups = async_to_streamed_response_wrapper( + tcp_resets_timeouts.timeseries_groups, + ) diff --git a/src/cloudflare/types/cloud_connector/__init__.py b/src/cloudflare/types/cloud_connector/__init__.py new file mode 100644 index 00000000000..2cf9f9bde2d --- /dev/null +++ b/src/cloudflare/types/cloud_connector/__init__.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .rule_list_response import RuleListResponse as RuleListResponse +from .rule_update_params import RuleUpdateParams as RuleUpdateParams +from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse diff --git a/src/cloudflare/types/cloud_connector/rule_list_response.py b/src/cloudflare/types/cloud_connector/rule_list_response.py new file mode 100644 index 00000000000..059d139b74b --- /dev/null +++ b/src/cloudflare/types/cloud_connector/rule_list_response.py @@ -0,0 +1,29 @@ +# 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 + +__all__ = ["RuleListResponse", "Parameters"] + + +class Parameters(BaseModel): + host: Optional[str] = None + """Host to perform Cloud Connection to""" + + +class RuleListResponse(BaseModel): + id: Optional[str] = None + + description: Optional[str] = None + + enabled: Optional[bool] = None + + expression: Optional[str] = None + + parameters: Optional[Parameters] = None + """Parameters of Cloud Connector Rule""" + + provider: Optional[Literal["aws_s3", "r2", "gcp_storage", "azure_storage"]] = None + """Cloud Provider type""" diff --git a/src/cloudflare/types/cloud_connector/rule_update_params.py b/src/cloudflare/types/cloud_connector/rule_update_params.py new file mode 100644 index 00000000000..f8c25c9b2a7 --- /dev/null +++ b/src/cloudflare/types/cloud_connector/rule_update_params.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["RuleUpdateParams", "Body", "BodyParameters"] + + +class RuleUpdateParams(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + + body: Required[Iterable[Body]] + """List of Cloud Connector rules""" + + +class BodyParameters(TypedDict, total=False): + host: str + """Host to perform Cloud Connection to""" + + +class Body(TypedDict, total=False): + id: str + + description: str + + enabled: bool + + expression: str + + parameters: BodyParameters + """Parameters of Cloud Connector Rule""" + + provider: Literal["aws_s3", "r2", "gcp_storage", "azure_storage"] + """Cloud Provider type""" diff --git a/src/cloudflare/types/cloud_connector/rule_update_response.py b/src/cloudflare/types/cloud_connector/rule_update_response.py new file mode 100644 index 00000000000..86d08cd682e --- /dev/null +++ b/src/cloudflare/types/cloud_connector/rule_update_response.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["RuleUpdateResponse", "RuleUpdateResponseItem", "RuleUpdateResponseItemParameters"] + + +class RuleUpdateResponseItemParameters(BaseModel): + host: Optional[str] = None + """Host to perform Cloud Connection to""" + + +class RuleUpdateResponseItem(BaseModel): + id: Optional[str] = None + + description: Optional[str] = None + + enabled: Optional[bool] = None + + expression: Optional[str] = None + + parameters: Optional[RuleUpdateResponseItemParameters] = None + """Parameters of Cloud Connector Rule""" + + provider: Optional[Literal["aws_s3", "r2", "gcp_storage", "azure_storage"]] = None + """Cloud Provider type""" + + +RuleUpdateResponse = List[RuleUpdateResponseItem] diff --git a/src/cloudflare/types/radar/__init__.py b/src/cloudflare/types/radar/__init__.py index c41928c0014..6fc109e3bb2 100644 --- a/src/cloudflare/types/radar/__init__.py +++ b/src/cloudflare/types/radar/__init__.py @@ -26,4 +26,12 @@ from .netflow_timeseries_response import NetflowTimeseriesResponse as NetflowTimeseriesResponse from .traffic_anomaly_get_response import TrafficAnomalyGetResponse as TrafficAnomalyGetResponse from .ranking_timeseries_groups_params import RankingTimeseriesGroupsParams as RankingTimeseriesGroupsParams +from .tcp_resets_timeout_summary_params import TCPResetsTimeoutSummaryParams as TCPResetsTimeoutSummaryParams from .ranking_timeseries_groups_response import RankingTimeseriesGroupsResponse as RankingTimeseriesGroupsResponse +from .tcp_resets_timeout_summary_response import TCPResetsTimeoutSummaryResponse as TCPResetsTimeoutSummaryResponse +from .tcp_resets_timeout_timeseries_groups_params import ( + TCPResetsTimeoutTimeseriesGroupsParams as TCPResetsTimeoutTimeseriesGroupsParams, +) +from .tcp_resets_timeout_timeseries_groups_response import ( + TCPResetsTimeoutTimeseriesGroupsResponse as TCPResetsTimeoutTimeseriesGroupsResponse, +) diff --git a/src/cloudflare/types/radar/tcp_resets_timeout_summary_params.py b/src/cloudflare/types/radar/tcp_resets_timeout_summary_params.py new file mode 100644 index 00000000000..a278b500c38 --- /dev/null +++ b/src/cloudflare/types/radar/tcp_resets_timeout_summary_params.py @@ -0,0 +1,53 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["TCPResetsTimeoutSummaryParams"] + + +class TCPResetsTimeoutSummaryParams(TypedDict, total=False): + asn: List[str] + """Array of comma separated list of ASNs, start with `-` to exclude from results. + + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + """ + + continent: List[str] + """Array of comma separated list of continents (alpha-2 continent codes). + + Start with `-` to exclude from results. For example, `-EU,NA` excludes results + from Europe, but includes results from North America. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """ + For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Array of datetimes to filter the start of a series.""" + + format: Literal["JSON", "CSV"] + """Format results are returned in.""" + + location: List[str] + """Array of comma separated list of locations (alpha-2 country codes). + + Start with `-` to exclude from results. For example, `-US,PT` excludes results + from the US, but includes results from PT. + """ + + name: List[str] + """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py b/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py new file mode 100644 index 00000000000..f38a9c7df46 --- /dev/null +++ b/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py @@ -0,0 +1,88 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = [ + "TCPResetsTimeoutSummaryResponse", + "Meta", + "MetaDateRange", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "Summary0", +] + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + + end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) + + linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None) + + start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) + + +class MetaConfidenceInfo(BaseModel): + annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None + + level: Optional[int] = None + + +class Meta(BaseModel): + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + + +class Summary0(BaseModel): + later_in_flow: str + """ + Connection resets within the first 10 packets from the client, but after the + server has received multiple data packets. + """ + + no_match: str + """All other connections.""" + + post_ack: str + """ + Connection resets or timeouts after the server received both a SYN packet and an + ACK packet, meaning the connection was successfully established. + """ + + post_psh: str + """ + Connection resets or timeouts after the server received a packet with PSH flag + set, following connection establishment. + """ + + post_syn: str + """ + Connection resets or timeouts after the server received only a single SYN + packet. + """ + + +class TCPResetsTimeoutSummaryResponse(BaseModel): + meta: Meta + + summary_0: Summary0 diff --git a/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_params.py b/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_params.py new file mode 100644 index 00000000000..81d83b0cdc2 --- /dev/null +++ b/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_params.py @@ -0,0 +1,60 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["TCPResetsTimeoutTimeseriesGroupsParams"] + + +class TCPResetsTimeoutTimeseriesGroupsParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """ + Aggregation interval results should be returned in (for example, in 15 minutes + or 1 hour intervals). Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + asn: List[str] + """Array of comma separated list of ASNs, start with `-` to exclude from results. + + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + """ + + continent: List[str] + """Array of comma separated list of continents (alpha-2 continent codes). + + Start with `-` to exclude from results. For example, `-EU,NA` excludes results + from Europe, but includes results from North America. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """ + For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Array of datetimes to filter the start of a series.""" + + format: Literal["JSON", "CSV"] + """Format results are returned in.""" + + location: List[str] + """Array of comma separated list of locations (alpha-2 country codes). + + Start with `-` to exclude from results. For example, `-US,PT` excludes results + from the US, but includes results from PT. + """ + + name: List[str] + """Array of names that will be used to name the series in responses.""" diff --git a/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py b/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py new file mode 100644 index 00000000000..84e1ce0e8ea --- /dev/null +++ b/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py @@ -0,0 +1,94 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = [ + "TCPResetsTimeoutTimeseriesGroupsResponse", + "Meta", + "MetaDateRange", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "Serie0", +] + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + + end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) + + linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None) + + start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) + + +class MetaConfidenceInfo(BaseModel): + annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None + + level: Optional[int] = None + + +class Meta(BaseModel): + agg_interval: str = FieldInfo(alias="aggInterval") + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + + confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + + +class Serie0(BaseModel): + later_in_flow: List[str] + """ + Connection resets within the first 10 packets from the client, but after the + server has received multiple data packets. + """ + + no_match: List[str] + """All other connections.""" + + post_ack: List[str] + """ + Connection resets or timeouts after the server received both a SYN packet and an + ACK packet, meaning the connection was successfully established. + """ + + post_psh: List[str] + """ + Connection resets or timeouts after the server received a packet with PSH flag + set, following connection establishment. + """ + + post_syn: List[str] + """ + Connection resets or timeouts after the server received only a single SYN + packet. + """ + + timestamps: List[datetime] + + +class TCPResetsTimeoutTimeseriesGroupsResponse(BaseModel): + meta: Meta + + serie_0: Serie0 diff --git a/tests/api_resources/cloud_connector/__init__.py b/tests/api_resources/cloud_connector/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/cloud_connector/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/cloud_connector/test_rules.py b/tests/api_resources/cloud_connector/test_rules.py new file mode 100644 index 00000000000..8506196e905 --- /dev/null +++ b/tests/api_resources/cloud_connector/test_rules.py @@ -0,0 +1,183 @@ +# 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.cloud_connector import RuleListResponse, RuleUpdateResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestRules: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + rule = client.cloud_connector.rules.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + body=[{}, {}, {}], + ) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.cloud_connector.rules.with_raw_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + body=[{}, {}, {}], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + rule = response.parse() + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.cloud_connector.rules.with_streaming_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + body=[{}, {}, {}], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + rule = response.parse() + assert_matches_type(Optional[RuleUpdateResponse], rule, 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 `zone_id` but received ''"): + client.cloud_connector.rules.with_raw_response.update( + zone_id="", + body=[{}, {}, {}], + ) + + @parametrize + def test_method_list(self, client: Cloudflare) -> None: + rule = client.cloud_connector.rules.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.cloud_connector.rules.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + rule = response.parse() + assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.cloud_connector.rules.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + rule = response.parse() + assert_matches_type(SyncSinglePage[RuleListResponse], rule, 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 `zone_id` but received ''"): + client.cloud_connector.rules.with_raw_response.list( + zone_id="", + ) + + +class TestAsyncRules: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + rule = await async_client.cloud_connector.rules.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + body=[{}, {}, {}], + ) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.cloud_connector.rules.with_raw_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + body=[{}, {}, {}], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + rule = await response.parse() + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.cloud_connector.rules.with_streaming_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + body=[{}, {}, {}], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + rule = await response.parse() + assert_matches_type(Optional[RuleUpdateResponse], rule, 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 `zone_id` but received ''"): + await async_client.cloud_connector.rules.with_raw_response.update( + zone_id="", + body=[{}, {}, {}], + ) + + @parametrize + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + rule = await async_client.cloud_connector.rules.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.cloud_connector.rules.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + rule = await response.parse() + assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.cloud_connector.rules.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + rule = await response.parse() + assert_matches_type(AsyncSinglePage[RuleListResponse], rule, 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 `zone_id` but received ''"): + await async_client.cloud_connector.rules.with_raw_response.list( + zone_id="", + ) diff --git a/tests/api_resources/radar/test_tcp_resets_timeouts.py b/tests/api_resources/radar/test_tcp_resets_timeouts.py new file mode 100644 index 00000000000..fc54e4be455 --- /dev/null +++ b/tests/api_resources/radar/test_tcp_resets_timeouts.py @@ -0,0 +1,216 @@ +# 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._utils import parse_datetime +from cloudflare.types.radar import ( + TCPResetsTimeoutSummaryResponse, + TCPResetsTimeoutTimeseriesGroupsResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestTCPResetsTimeouts: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_summary(self, client: Cloudflare) -> None: + tcp_resets_timeout = client.radar.tcp_resets_timeouts.summary() + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + def test_method_summary_with_all_params(self, client: Cloudflare) -> None: + tcp_resets_timeout = client.radar.tcp_resets_timeouts.summary( + asn=["string", "string", "string"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["7d", "7d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + format="JSON", + location=["string", "string", "string"], + name=["string", "string", "string"], + ) + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + def test_raw_response_summary(self, client: Cloudflare) -> None: + response = client.radar.tcp_resets_timeouts.with_raw_response.summary() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + tcp_resets_timeout = response.parse() + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + def test_streaming_response_summary(self, client: Cloudflare) -> None: + with client.radar.tcp_resets_timeouts.with_streaming_response.summary() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + tcp_resets_timeout = response.parse() + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_timeseries_groups(self, client: Cloudflare) -> None: + tcp_resets_timeout = client.radar.tcp_resets_timeouts.timeseries_groups() + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: + tcp_resets_timeout = client.radar.tcp_resets_timeouts.timeseries_groups( + agg_interval="1h", + asn=["string", "string", "string"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["7d", "7d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + format="JSON", + location=["string", "string", "string"], + name=["string", "string", "string"], + ) + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: + response = client.radar.tcp_resets_timeouts.with_raw_response.timeseries_groups() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + tcp_resets_timeout = response.parse() + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: + with client.radar.tcp_resets_timeouts.with_streaming_response.timeseries_groups() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + tcp_resets_timeout = response.parse() + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncTCPResetsTimeouts: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_summary(self, async_client: AsyncCloudflare) -> None: + tcp_resets_timeout = await async_client.radar.tcp_resets_timeouts.summary() + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: + tcp_resets_timeout = await async_client.radar.tcp_resets_timeouts.summary( + asn=["string", "string", "string"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["7d", "7d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + format="JSON", + location=["string", "string", "string"], + name=["string", "string", "string"], + ) + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.tcp_resets_timeouts.with_raw_response.summary() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + tcp_resets_timeout = await response.parse() + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.tcp_resets_timeouts.with_streaming_response.summary() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + tcp_resets_timeout = await response.parse() + assert_matches_type(TCPResetsTimeoutSummaryResponse, tcp_resets_timeout, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + tcp_resets_timeout = await async_client.radar.tcp_resets_timeouts.timeseries_groups() + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: + tcp_resets_timeout = await async_client.radar.tcp_resets_timeouts.timeseries_groups( + agg_interval="1h", + asn=["string", "string", "string"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["7d", "7d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + format="JSON", + location=["string", "string", "string"], + name=["string", "string", "string"], + ) + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.tcp_resets_timeouts.with_raw_response.timeseries_groups() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + tcp_resets_timeout = await response.parse() + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + @parametrize + async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.tcp_resets_timeouts.with_streaming_response.timeseries_groups() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + tcp_resets_timeout = await response.parse() + assert_matches_type(TCPResetsTimeoutTimeseriesGroupsResponse, tcp_resets_timeout, path=["response"]) + + assert cast(Any, response.is_closed) is True From 6134898fdd4e64d8b2c30122c45fe7e2f2793523 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 09:18:27 +0000 Subject: [PATCH 244/316] 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 fb607b85317..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From a8cad592935bbd685e0f504573cf7c8fb191951c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 09:30:38 +0000 Subject: [PATCH 245/316] 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 18b4714e5c8..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 5cf1ddeaa0181abab3c87e5d5bf19d92232c065b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 10:33:46 +0000 Subject: [PATCH 246/316] 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 c79e3bed3f1..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 8236e8bf6764880e4347bc855d5e26ce1b506f63 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 11:18:43 +0000 Subject: [PATCH 247/316] 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 fb607b85317..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 23722cc37209e138c5d791194c336a9f104616f6 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 12:40:06 +0000 Subject: [PATCH 248/316] 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 c79e3bed3f1..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From fba0e374dce1386b26e218a688de14356e75f6d2 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 12:47:52 +0000 Subject: [PATCH 249/316] 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 18b4714e5c8..1e65fea5e37 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml From 74958bdef6ca704ccb6a6f526ec6f94013f29240 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 13:13:18 +0000 Subject: [PATCH 250/316] 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 1e65fea5e37..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From 8110894e0b2ab5cce47c00a6abbb88921deb3836 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 14:28:57 +0000 Subject: [PATCH 251/316] 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 18b4714e5c8..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 93bdfad87e3d6384d300305293eb2a2338c2bcb1 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 14:41:06 +0000 Subject: [PATCH 252/316] 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 c79e3bed3f1..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From f60b1656d2761b02fe3c83ee06b055ec37a2bb28 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 14:57:14 +0000 Subject: [PATCH 253/316] 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 fb607b85317..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From 89d49a90268b05872114ca2e5d36b57478033aae Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 15:43:54 +0000 Subject: [PATCH 254/316] 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 18b4714e5c8..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From c174dc7973c277aa6311f8abf57c82029171b05a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 16:01:57 +0000 Subject: [PATCH 255/316] 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 fb607b85317..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From cfa44153bb98e1d5de4f6c5b40e829393dcc0fee Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 16:37:55 +0000 Subject: [PATCH 256/316] 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 18b4714e5c8..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 009cfadeaadda6369a5a54b411ad49eb1c8080e6 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 17:29:00 +0000 Subject: [PATCH 257/316] 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 c79e3bed3f1..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From cf7cc163606391bd6f31a63fba6b9a35886e3655 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 17:31:25 +0000 Subject: [PATCH 258/316] 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 18b4714e5c8..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 852b7dc358f64d43b4f582c1bdb419982297d381 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 17:49:25 +0000 Subject: [PATCH 259/316] 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 fb607b85317..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 1cba5a7c0dc808b4c9159441fb8cc92aa2bcbfb4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 17:51:32 +0000 Subject: [PATCH 260/316] 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 c79e3bed3f1..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From b80c95a5acf45b0a74fdfb079d5b4b2ba29f4889 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 18:03:00 +0000 Subject: [PATCH 261/316] 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 18b4714e5c8..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 12381332af5e19131244ec7de5497afb29925a2c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 18:05:10 +0000 Subject: [PATCH 262/316] 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 fb607b85317..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From 17f284ac3d485d7e5849225f2a8d03bb951c94e2 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 18:07:14 +0000 Subject: [PATCH 263/316] 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 18b4714e5c8..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 9aae738690c7f728835e2a883f7cd485582bc0c6 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 18:09:23 +0000 Subject: [PATCH 264/316] 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 fb607b85317..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 53f952b0cacf7f2fb3bb07ef3c2244774058f90b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 18:33:42 +0000 Subject: [PATCH 265/316] 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 c79e3bed3f1..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 8e5a9db1035e89e25e96023a9a37c673c9f83020 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 18:35:54 +0000 Subject: [PATCH 266/316] 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 fb607b85317..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From e75f49950ef8916ae747d51f8811f3e0a4b2a35a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 19:09:03 +0000 Subject: [PATCH 267/316] 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 18b4714e5c8..1e65fea5e37 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml From 86071592bef075f2d0934fb87d009a948297fa38 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 19:11:19 +0000 Subject: [PATCH 268/316] 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 1e65fea5e37..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0b630b614d968eff3e6b299faac6ebb4bf04b4e9501776fad860220d15c8f2b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 64a4acd3f11453eaf7bd817324f32410c7e2eefc Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 19:50:09 +0000 Subject: [PATCH 269/316] 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 c79e3bed3f1..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 7fcc030e0b825047f3e9d230b686489e1dd144b0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 19:52:12 +0000 Subject: [PATCH 270/316] 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 fb607b85317..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From 87d6d49d65697be7bfb046a3b26f4e765af3e463 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 22:04:02 +0000 Subject: [PATCH 271/316] 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 c79e3bed3f1..18b4714e5c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml From c94a7430a205e7d855a63b20b94728f46a97942b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 22:06:02 +0000 Subject: [PATCH 272/316] 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 18b4714e5c8..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02dcdd43f9d81a44e69bd9922399eabebacbe113ec7b9d8ee23cfeef78b7aa02.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From 2fdfcf5572dfb167a5292f6dc15ed0eb28ff941a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 12 Jul 2024 22:26:45 +0000 Subject: [PATCH 273/316] 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 fb607b85317..c79e3bed3f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml From c08fb0db23befef2db80f531c8a12d2f607cb562 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Sat, 13 Jul 2024 03:15:25 +0000 Subject: [PATCH 274/316] 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 c79e3bed3f1..fb607b85317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efe69e507dd4af68cc325c8275001a6986b7e28460996532c5ee22e67851efe9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml From efafb96456cbf3314ab93dfb3dbf71d554a77eec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 01:23:53 +0000 Subject: [PATCH 275/316] feat(api): update via SDK Studio (#1181) --- .stats.yml | 2 +- src/cloudflare/resources/workers/ai/ai.py | 134 ++++- src/cloudflare/types/workers/ai_run_params.py | 90 +++- tests/api_resources/workers/test_ai.py | 480 ++++++++++++++++-- 4 files changed, 648 insertions(+), 58 deletions(-) diff --git a/.stats.yml b/.stats.yml index fb607b85317..53103a816fb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cb76af21f6fcf485b7e41586c3076cd45d25d6d04971c77ec814523b894dcb97.yml diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index 9eabaca9253..a3685c12491 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -320,12 +320,64 @@ def run( model_name: str, *, account_id: str, + prompt: str, + frequency_penalty: float | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, - prompt: str | NotGiven = NOT_GIVEN, + presence_penalty: float | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, + repetition_penalty: float | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, + temperature: float | NotGiven = NOT_GIVEN, + top_k: int | NotGiven = NOT_GIVEN, + top_p: float | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[AIRunResponse]: + """ + This endpoint provides users with the capability to run specific AI models + on-demand. + + By submitting the required input data, users can receive real-time predictions + or results generated by the chosen AI model. The endpoint supports various AI + model types, ensuring flexibility and adaptability for diverse use cases. + + Model specific inputs available in + [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def run( + self, + model_name: str, + *, + account_id: str, + messages: Iterable[ai_run_params.Variant8Message], + frequency_penalty: float | NotGiven = NOT_GIVEN, + max_tokens: int | NotGiven = NOT_GIVEN, + presence_penalty: float | NotGiven = NOT_GIVEN, + repetition_penalty: float | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, + stream: bool | NotGiven = NOT_GIVEN, + temperature: float | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + top_k: int | NotGiven = NOT_GIVEN, + top_p: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -478,6 +530,7 @@ def run( ["account_id", "audio"], ["account_id", "image"], ["account_id"], + ["account_id", "messages"], ["account_id", "target_lang", "text"], ["account_id", "input_text"], ) @@ -502,16 +555,22 @@ def run( strength: float | NotGiven = NOT_GIVEN, width: int | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, + frequency_penalty: float | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, + presence_penalty: float | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, + repetition_penalty: float | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, + temperature: float | NotGiven = NOT_GIVEN, + top_k: int | NotGiven = NOT_GIVEN, + top_p: float | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.Variant8Message] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, max_length: int | NotGiven = NOT_GIVEN, - temperature: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -825,12 +884,64 @@ async def run( model_name: str, *, account_id: str, + prompt: str, + frequency_penalty: float | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, - prompt: str | NotGiven = NOT_GIVEN, + presence_penalty: float | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, + repetition_penalty: float | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, + temperature: float | NotGiven = NOT_GIVEN, + top_k: int | NotGiven = NOT_GIVEN, + top_p: float | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[AIRunResponse]: + """ + This endpoint provides users with the capability to run specific AI models + on-demand. + + By submitting the required input data, users can receive real-time predictions + or results generated by the chosen AI model. The endpoint supports various AI + model types, ensuring flexibility and adaptability for diverse use cases. + + Model specific inputs available in + [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def run( + self, + model_name: str, + *, + account_id: str, + messages: Iterable[ai_run_params.Variant8Message], + frequency_penalty: float | NotGiven = NOT_GIVEN, + max_tokens: int | NotGiven = NOT_GIVEN, + presence_penalty: float | NotGiven = NOT_GIVEN, + repetition_penalty: float | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, + stream: bool | NotGiven = NOT_GIVEN, + temperature: float | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + top_k: int | NotGiven = NOT_GIVEN, + top_p: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -983,6 +1094,7 @@ async def run( ["account_id", "audio"], ["account_id", "image"], ["account_id"], + ["account_id", "messages"], ["account_id", "target_lang", "text"], ["account_id", "input_text"], ) @@ -1007,16 +1119,22 @@ async def run( strength: float | NotGiven = NOT_GIVEN, width: int | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, + frequency_penalty: float | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, + presence_penalty: float | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, + repetition_penalty: float | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, + temperature: float | NotGiven = NOT_GIVEN, + top_k: int | NotGiven = NOT_GIVEN, + top_p: float | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.Variant8Message] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, max_length: int | NotGiven = NOT_GIVEN, - temperature: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index c4267b81bf5..835090f17db 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Union, Iterable +from typing import Dict, List, Union, Iterable from typing_extensions import Required, TypedDict __all__ = [ @@ -14,8 +14,13 @@ "AutomaticSpeechRecognition", "ImageClassification", "ObjectDetection", - "TextGeneration", - "TextGenerationMessage", + "Variant7", + "Variant8", + "Variant8Message", + "Variant8Tool", + "Variant8ToolFunction", + "Variant8ToolFunctionParameters", + "Variant8ToolFunctionParametersProperties", "Translation", "Summarization", "ImageToText", @@ -89,28 +94,94 @@ class ObjectDetection(TypedDict, total=False): image: Iterable[float] -class TextGeneration(TypedDict, total=False): +class Variant7(TypedDict, total=False): account_id: Required[str] + prompt: Required[str] + + frequency_penalty: float + lora: str max_tokens: int - messages: Iterable[TextGenerationMessage] - - prompt: str + presence_penalty: float raw: bool + repetition_penalty: float + + seed: int + + stream: bool + + temperature: float + + top_k: int + + top_p: float + + +class Variant8(TypedDict, total=False): + account_id: Required[str] + + messages: Required[Iterable[Variant8Message]] + + frequency_penalty: float + + max_tokens: int + + presence_penalty: float + + repetition_penalty: float + + seed: int + stream: bool + temperature: float + + tools: Iterable[Variant8Tool] + + top_k: int -class TextGenerationMessage(TypedDict, total=False): + top_p: float + + +class Variant8Message(TypedDict, total=False): content: Required[str] role: Required[str] +class Variant8ToolFunctionParametersProperties(TypedDict, total=False): + description: str + + type: str + + +class Variant8ToolFunctionParameters(TypedDict, total=False): + properties: Dict[str, Variant8ToolFunctionParametersProperties] + + required: List[str] + + type: str + + +class Variant8ToolFunction(TypedDict, total=False): + description: str + + name: str + + parameters: Variant8ToolFunctionParameters + + +class Variant8Tool(TypedDict, total=False): + function: Variant8ToolFunction + + type: str + + class Translation(TypedDict, total=False): account_id: Required[str] @@ -159,7 +230,8 @@ class ImageToTextMessage(TypedDict, total=False): AutomaticSpeechRecognition, ImageClassification, ObjectDetection, - TextGeneration, + Variant7, + Variant8, Translation, Summarization, ImageToText, diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index 538d0fb1c39..5af829b9c8c 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -418,6 +418,7 @@ def test_method_run_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -426,8 +427,70 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + frequency_penalty=0, lora="lora", max_tokens=0, + presence_penalty=0, + raw=True, + repetition_penalty=0, + seed=1, + stream=True, + temperature=0, + top_k=1, + top_p=0, + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: + response = client.workers.ai.with_raw_response.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai = response.parse() + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: + with client.workers.ai.with_streaming_response.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai = response.parse() + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_run_overload_8(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.workers.ai.with_raw_response.run( + model_name="model_name", + account_id="", + prompt="x", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): + client.workers.ai.with_raw_response.run( + model_name="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + ) + + @parametrize + def test_method_run_overload_9(self, client: Cloudflare) -> None: + ai = client.workers.ai.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", messages=[ { "content": "content", @@ -442,17 +505,112 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None "role": "role", }, ], - prompt="x", - raw=True, + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: + ai = client.workers.ai.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], + frequency_penalty=0, + max_tokens=0, + presence_penalty=0, + repetition_penalty=0, + seed=1, stream=True, + temperature=0, + tools=[ + { + "function": { + "description": "description", + "name": "name", + "parameters": { + "properties": { + "foo": { + "description": "description", + "type": "type", + } + }, + "required": ["string", "string", "string"], + "type": "type", + }, + }, + "type": "type", + }, + { + "function": { + "description": "description", + "name": "name", + "parameters": { + "properties": { + "foo": { + "description": "description", + "type": "type", + } + }, + "required": ["string", "string", "string"], + "type": "type", + }, + }, + "type": "type", + }, + { + "function": { + "description": "description", + "name": "name", + "parameters": { + "properties": { + "foo": { + "description": "description", + "type": "type", + } + }, + "required": ["string", "string", "string"], + "type": "type", + }, + }, + "type": "type", + }, + ], + top_k=1, + top_p=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) assert response.is_closed is True @@ -461,10 +619,24 @@ def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -475,21 +647,49 @@ def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_8(self, client: Cloudflare) -> None: + def test_path_params_run_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", account_id="", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) @parametrize - def test_method_run_overload_9(self, client: Cloudflare) -> None: + def test_method_run_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -499,7 +699,7 @@ def test_method_run_overload_9(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -510,7 +710,7 @@ def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -524,7 +724,7 @@ def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -540,7 +740,7 @@ def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_9(self, client: Cloudflare) -> None: + def test_path_params_run_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -558,7 +758,7 @@ def test_path_params_run_overload_9(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_10(self, client: Cloudflare) -> None: + def test_method_run_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -567,7 +767,7 @@ def test_method_run_overload_10(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -577,7 +777,7 @@ def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -590,7 +790,7 @@ def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -605,7 +805,7 @@ def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_10(self, client: Cloudflare) -> None: + def test_path_params_run_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -621,7 +821,7 @@ def test_path_params_run_overload_10(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_11(self, client: Cloudflare) -> None: + def test_method_run_overload_12(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -630,7 +830,7 @@ def test_method_run_overload_11(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_12(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -657,7 +857,7 @@ def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_12(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -670,7 +870,7 @@ def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_12(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -685,7 +885,7 @@ def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_11(self, client: Cloudflare) -> None: + def test_path_params_run_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1105,6 +1305,7 @@ async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> Non ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -1113,8 +1314,70 @@ async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCl ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + frequency_penalty=0, lora="lora", max_tokens=0, + presence_penalty=0, + raw=True, + repetition_penalty=0, + seed=1, + stream=True, + temperature=0, + top_k=1, + top_p=0, + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + response = await async_client.workers.ai.with_raw_response.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai = await response.parse() + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async with async_client.workers.ai.with_streaming_response.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai = await response.parse() + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.workers.ai.with_raw_response.run( + model_name="model_name", + account_id="", + prompt="x", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): + await async_client.workers.ai.with_raw_response.run( + model_name="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", + ) + + @parametrize + async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: + ai = await async_client.workers.ai.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", messages=[ { "content": "content", @@ -1129,17 +1392,112 @@ async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCl "role": "role", }, ], - prompt="x", - raw=True, + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @parametrize + async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: + ai = await async_client.workers.ai.run( + model_name="model_name", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], + frequency_penalty=0, + max_tokens=0, + presence_penalty=0, + repetition_penalty=0, + seed=1, stream=True, + temperature=0, + tools=[ + { + "function": { + "description": "description", + "name": "name", + "parameters": { + "properties": { + "foo": { + "description": "description", + "type": "type", + } + }, + "required": ["string", "string", "string"], + "type": "type", + }, + }, + "type": "type", + }, + { + "function": { + "description": "description", + "name": "name", + "parameters": { + "properties": { + "foo": { + "description": "description", + "type": "type", + } + }, + "required": ["string", "string", "string"], + "type": "type", + }, + }, + "type": "type", + }, + { + "function": { + "description": "description", + "name": "name", + "parameters": { + "properties": { + "foo": { + "description": "description", + "type": "type", + } + }, + "required": ["string", "string", "string"], + "type": "type", + }, + }, + "type": "type", + }, + ], + top_k=1, + top_p=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) assert response.is_closed is True @@ -1148,10 +1506,24 @@ async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1162,21 +1534,49 @@ async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", + messages=[ + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + { + "content": "content", + "role": "role", + }, + ], ) @parametrize - async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1186,7 +1586,7 @@ async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1197,7 +1597,7 @@ async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1211,7 +1611,7 @@ async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1227,7 +1627,7 @@ async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1245,7 +1645,7 @@ async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1254,7 +1654,7 @@ async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1264,7 +1664,7 @@ async def test_method_run_with_all_params_overload_10(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1277,7 +1677,7 @@ async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1292,7 +1692,7 @@ async def test_streaming_response_run_overload_10(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1308,7 +1708,7 @@ async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) ) @parametrize - async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_12(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1317,7 +1717,7 @@ async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1344,7 +1744,7 @@ async def test_method_run_with_all_params_overload_11(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1357,7 +1757,7 @@ async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1372,7 +1772,7 @@ async def test_streaming_response_run_overload_11(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", From 41a8d2246f92dcafba6a7f728ed21bdf354cd508 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 04:54:53 +0000 Subject: [PATCH 276/316] feat(api): update via SDK Studio (#1182) --- .stats.yml | 2 +- .../zero_trust/networks/routes/networks.py | 8 ++++++++ .../zero_trust/networks/routes/routes.py | 16 ++++++++++++++++ .../prioritize_update_params.py | 3 +++ .../zero_trust/networks/route_create_params.py | 3 +++ .../zero_trust/networks/route_edit_params.py | 3 +++ .../networks/routes/network_create_params.py | 3 +++ .../zero_trust/networks/routes/test_networks.py | 12 ++++++++++++ .../zero_trust/networks/test_routes.py | 12 ++++++++++++ 9 files changed, 61 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 53103a816fb..b9d92cc7a0f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cb76af21f6fcf485b7e41586c3076cd45d25d6d04971c77ec814523b894dcb97.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f86dcdd3b76e16dc467b91bfa22be2423bd847e93a59d892004b29812777d217.yml diff --git a/src/cloudflare/resources/zero_trust/networks/routes/networks.py b/src/cloudflare/resources/zero_trust/networks/routes/networks.py index c5defa8b985..6363a91a951 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/networks.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/networks.py @@ -42,6 +42,7 @@ def create( ip_network_encoded: str, *, account_id: str, + tunnel_id: str, comment: str | NotGiven = NOT_GIVEN, virtual_network_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. @@ -61,6 +62,8 @@ def create( ip_network_encoded: IP/CIDR range in URL-encoded format + tunnel_id: UUID of the tunnel. + comment: Optional remark describing the route. virtual_network_id: UUID of the virtual network. @@ -81,6 +84,7 @@ def create( f"/accounts/{account_id}/teamnet/routes/network/{ip_network_encoded}", body=maybe_transform( { + "tunnel_id": tunnel_id, "comment": comment, "virtual_network_id": virtual_network_id, }, @@ -225,6 +229,7 @@ async def create( ip_network_encoded: str, *, account_id: str, + tunnel_id: str, comment: str | NotGiven = NOT_GIVEN, virtual_network_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. @@ -244,6 +249,8 @@ async def create( ip_network_encoded: IP/CIDR range in URL-encoded format + tunnel_id: UUID of the tunnel. + comment: Optional remark describing the route. virtual_network_id: UUID of the virtual network. @@ -264,6 +271,7 @@ async def create( f"/accounts/{account_id}/teamnet/routes/network/{ip_network_encoded}", body=await async_maybe_transform( { + "tunnel_id": tunnel_id, "comment": comment, "virtual_network_id": virtual_network_id, }, diff --git a/src/cloudflare/resources/zero_trust/networks/routes/routes.py b/src/cloudflare/resources/zero_trust/networks/routes/routes.py index 102a782dfa7..d4d7cb45e53 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/routes.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/routes.py @@ -68,6 +68,7 @@ def create( *, account_id: str, network: str, + tunnel_id: str, comment: str | NotGiven = NOT_GIVEN, virtual_network_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. @@ -85,6 +86,8 @@ def create( network: The private IPv4 or IPv6 range connected by the route, in CIDR notation. + tunnel_id: UUID of the tunnel. + comment: Optional remark describing the route. virtual_network_id: UUID of the virtual network. @@ -104,6 +107,7 @@ def create( body=maybe_transform( { "network": network, + "tunnel_id": tunnel_id, "comment": comment, "virtual_network_id": virtual_network_id, }, @@ -260,6 +264,7 @@ def edit( account_id: str, comment: str | NotGiven = NOT_GIVEN, network: str | NotGiven = NOT_GIVEN, + tunnel_id: str | NotGiven = NOT_GIVEN, virtual_network_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. @@ -282,6 +287,8 @@ def edit( network: The private IPv4 or IPv6 range connected by the route, in CIDR notation. + tunnel_id: UUID of the tunnel. + virtual_network_id: UUID of the virtual network. extra_headers: Send extra headers @@ -302,6 +309,7 @@ def edit( { "comment": comment, "network": network, + "tunnel_id": tunnel_id, "virtual_network_id": virtual_network_id, }, route_edit_params.RouteEditParams, @@ -339,6 +347,7 @@ async def create( *, account_id: str, network: str, + tunnel_id: str, comment: str | NotGiven = NOT_GIVEN, virtual_network_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. @@ -356,6 +365,8 @@ async def create( network: The private IPv4 or IPv6 range connected by the route, in CIDR notation. + tunnel_id: UUID of the tunnel. + comment: Optional remark describing the route. virtual_network_id: UUID of the virtual network. @@ -375,6 +386,7 @@ async def create( body=await async_maybe_transform( { "network": network, + "tunnel_id": tunnel_id, "comment": comment, "virtual_network_id": virtual_network_id, }, @@ -531,6 +543,7 @@ async def edit( account_id: str, comment: str | NotGiven = NOT_GIVEN, network: str | NotGiven = NOT_GIVEN, + tunnel_id: str | NotGiven = NOT_GIVEN, virtual_network_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. @@ -553,6 +566,8 @@ async def edit( network: The private IPv4 or IPv6 range connected by the route, in CIDR notation. + tunnel_id: UUID of the tunnel. + virtual_network_id: UUID of the virtual network. extra_headers: Send extra headers @@ -573,6 +588,7 @@ async def edit( { "comment": comment, "network": network, + "tunnel_id": tunnel_id, "virtual_network_id": virtual_network_id, }, route_edit_params.RouteEditParams, diff --git a/src/cloudflare/types/custom_certificates/prioritize_update_params.py b/src/cloudflare/types/custom_certificates/prioritize_update_params.py index 5924e7533a0..8e290afb630 100644 --- a/src/cloudflare/types/custom_certificates/prioritize_update_params.py +++ b/src/cloudflare/types/custom_certificates/prioritize_update_params.py @@ -17,6 +17,9 @@ class PrioritizeUpdateParams(TypedDict, total=False): class Certificate(TypedDict, total=False): + id: str + """Identifier""" + priority: float """The order/priority in which the certificate will be used in a request. diff --git a/src/cloudflare/types/zero_trust/networks/route_create_params.py b/src/cloudflare/types/zero_trust/networks/route_create_params.py index 1d2fe28479d..635da63698f 100644 --- a/src/cloudflare/types/zero_trust/networks/route_create_params.py +++ b/src/cloudflare/types/zero_trust/networks/route_create_params.py @@ -14,6 +14,9 @@ class RouteCreateParams(TypedDict, total=False): network: Required[str] """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" + tunnel_id: Required[str] + """UUID of the tunnel.""" + comment: str """Optional remark describing the route.""" diff --git a/src/cloudflare/types/zero_trust/networks/route_edit_params.py b/src/cloudflare/types/zero_trust/networks/route_edit_params.py index 1640ce2c28b..5d0a383e5f0 100644 --- a/src/cloudflare/types/zero_trust/networks/route_edit_params.py +++ b/src/cloudflare/types/zero_trust/networks/route_edit_params.py @@ -17,5 +17,8 @@ class RouteEditParams(TypedDict, total=False): network: str """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" + tunnel_id: str + """UUID of the tunnel.""" + virtual_network_id: str """UUID of the virtual network.""" diff --git a/src/cloudflare/types/zero_trust/networks/routes/network_create_params.py b/src/cloudflare/types/zero_trust/networks/routes/network_create_params.py index 5f145557ca0..f33811b5e5e 100644 --- a/src/cloudflare/types/zero_trust/networks/routes/network_create_params.py +++ b/src/cloudflare/types/zero_trust/networks/routes/network_create_params.py @@ -11,6 +11,9 @@ class NetworkCreateParams(TypedDict, total=False): account_id: Required[str] """Cloudflare account ID""" + tunnel_id: Required[str] + """UUID of the tunnel.""" + comment: str """Optional remark describing the route.""" diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py index 484c99fdd33..5f9fb16ca2d 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_networks.py +++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py @@ -22,6 +22,7 @@ def test_method_create(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Route, network, path=["response"]) @@ -30,6 +31,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -40,6 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert response.is_closed is True @@ -52,6 +55,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,12 +71,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.networks.routes.networks.with_raw_response.create( ip_network_encoded="172.16.0.0%2F16", account_id="", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.create( ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @parametrize @@ -191,6 +197,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Route, network, path=["response"]) @@ -199,6 +206,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare network = await async_client.zero_trust.networks.routes.networks.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -209,6 +217,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert response.is_closed is True @@ -221,6 +230,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.networks.routes.networks.with_streaming_response.create( ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -236,12 +246,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.networks.routes.networks.with_raw_response.create( ip_network_encoded="172.16.0.0%2F16", account_id="", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.create( ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @parametrize diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py index be4aa81b146..c1bc1d16c66 100644 --- a/tests/api_resources/zero_trust/networks/test_routes.py +++ b/tests/api_resources/zero_trust/networks/test_routes.py @@ -27,6 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Route, route, path=["response"]) @@ -35,6 +36,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -45,6 +47,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert response.is_closed is True @@ -57,6 +60,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -72,6 +76,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.networks.routes.with_raw_response.create( account_id="", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @parametrize @@ -193,6 +198,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Route, route, path=["response"]) @@ -246,6 +252,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Route, route, path=["response"]) @@ -254,6 +261,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare route = await async_client.zero_trust.networks.routes.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -264,6 +272,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert response.is_closed is True @@ -276,6 +285,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.networks.routes.with_streaming_response.create( account_id="699d98642c564d2e855e9661899b7252", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -291,6 +301,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.networks.routes.with_raw_response.create( account_id="", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @parametrize @@ -412,6 +423,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", network="172.16.0.0/16", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Route, route, path=["response"]) From 2dce4afe424da4476ba095c6d8ae93dc88377b5a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 08:09:07 +0000 Subject: [PATCH 277/316] 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 b9d92cc7a0f..23a80646b10 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f86dcdd3b76e16dc467b91bfa22be2423bd847e93a59d892004b29812777d217.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ef67d6f67b25546d096188d487750c4f93a8fe91cea032da7eea0b1fae24e00.yml From 8fdc3df35e7920199ba257dcda0f804f997758cf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:36:03 +0000 Subject: [PATCH 278/316] feat(api): OpenAPI spec update via Stainless API (#1183) --- .stats.yml | 2 +- src/cloudflare/_base_client.py | 12 ++++++------ src/cloudflare/_compat.py | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 23a80646b10..8a797e552c6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ef67d6f67b25546d096188d487750c4f93a8fe91cea032da7eea0b1fae24e00.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba6989e092ceb9b2700a5005e1b79d3de9fb5a8abf6d73406bece08a7662171c.yml diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index 261565626bf..ac63cf2cd11 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -879,9 +879,9 @@ def __exit__( def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options def _prepare_request( self, @@ -961,7 +961,7 @@ def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - self._prepare_options(options) + options = self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1442,9 +1442,9 @@ async def __aexit__( async def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options async def _prepare_request( self, @@ -1529,7 +1529,7 @@ async def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - await self._prepare_options(options) + options = await self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) diff --git a/src/cloudflare/_compat.py b/src/cloudflare/_compat.py index 74c7639b4cd..c919b5adb3e 100644 --- a/src/cloudflare/_compat.py +++ b/src/cloudflare/_compat.py @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: return model.__fields__ # type: ignore -def model_copy(model: _ModelT) -> _ModelT: +def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: if PYDANTIC_V2: - return model.model_copy() - return model.copy() # type: ignore + return model.model_copy(deep=deep) + return model.copy(deep=deep) # type: ignore def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: From 25166648100df6ea94d8d7c5ccdddf3354870599 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 11:56:15 +0000 Subject: [PATCH 279/316] 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 8a797e552c6..bb0c14cd158 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba6989e092ceb9b2700a5005e1b79d3de9fb5a8abf6d73406bece08a7662171c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd5f7da8fc0afc1e4ba5ae153a349542a5b61b18b36e47be62f021fdb42206e3.yml From 1729a2cdd4171289500c8c335196177e3cd0dcff Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 14:04:22 +0000 Subject: [PATCH 280/316] 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 bb0c14cd158..b9d92cc7a0f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd5f7da8fc0afc1e4ba5ae153a349542a5b61b18b36e47be62f021fdb42206e3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f86dcdd3b76e16dc467b91bfa22be2423bd847e93a59d892004b29812777d217.yml From c3abf890c1575e305cb0bfb8db5573f372460526 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 14:20:50 +0000 Subject: [PATCH 281/316] 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 b9d92cc7a0f..bb0c14cd158 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f86dcdd3b76e16dc467b91bfa22be2423bd847e93a59d892004b29812777d217.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd5f7da8fc0afc1e4ba5ae153a349542a5b61b18b36e47be62f021fdb42206e3.yml From 11cfe41b8e80ae2405fa01ab1d7dd1893f2cbb2c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 14:46:33 +0000 Subject: [PATCH 282/316] 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 bb0c14cd158..8a797e552c6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd5f7da8fc0afc1e4ba5ae153a349542a5b61b18b36e47be62f021fdb42206e3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba6989e092ceb9b2700a5005e1b79d3de9fb5a8abf6d73406bece08a7662171c.yml From 7b4ad6eb4aaba4f17d146dd848f67d9dcdcba159 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 15:26:18 +0000 Subject: [PATCH 283/316] 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 8a797e552c6..23a80646b10 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba6989e092ceb9b2700a5005e1b79d3de9fb5a8abf6d73406bece08a7662171c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ef67d6f67b25546d096188d487750c4f93a8fe91cea032da7eea0b1fae24e00.yml From 86075bbe47a78093139791c627604aa58772c1a1 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 16:31:07 +0000 Subject: [PATCH 284/316] 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 23a80646b10..b9d92cc7a0f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ef67d6f67b25546d096188d487750c4f93a8fe91cea032da7eea0b1fae24e00.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f86dcdd3b76e16dc467b91bfa22be2423bd847e93a59d892004b29812777d217.yml From 83cd3fdb839de792fe43191b6f5ff9dfff28bd0e Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 17:14:45 +0000 Subject: [PATCH 285/316] 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 b9d92cc7a0f..8a797e552c6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f86dcdd3b76e16dc467b91bfa22be2423bd847e93a59d892004b29812777d217.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba6989e092ceb9b2700a5005e1b79d3de9fb5a8abf6d73406bece08a7662171c.yml From bb958239243ec5bed89615884104cba1df4543e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:46:47 +0000 Subject: [PATCH 286/316] feat(api): OpenAPI spec update via Stainless API (#1184) --- .stats.yml | 2 +- api.md | 2 +- .../resources/zero_trust/gateway/locations.py | 49 ++++++- .../types/zero_trust/gateway/__init__.py | 2 - .../types/zero_trust/gateway/location.py | 122 +++++++++++++++++- .../gateway/location_create_params.py | 26 +++- .../zero_trust/gateway/location_network.py | 12 -- .../gateway/location_network_param.py | 12 -- .../gateway/location_update_params.py | 26 +++- .../zero_trust/gateway/test_locations.py | 4 + 10 files changed, 210 insertions(+), 47 deletions(-) delete mode 100644 src/cloudflare/types/zero_trust/gateway/location_network.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/location_network_param.py diff --git a/.stats.yml b/.stats.yml index 8a797e552c6..60b6da89c5d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba6989e092ceb9b2700a5005e1b79d3de9fb5a8abf6d73406bece08a7662171c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-376cc25a50d22c4ac996448cf4e073f8b1065424b312a46422d1eb663491e28a.yml diff --git a/api.md b/api.md index f55013739bb..9418685f613 100644 --- a/api.md +++ b/api.md @@ -5496,7 +5496,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.gateway import Location, LocationNetwork, LocationDeleteResponse +from cloudflare.types.zero_trust.gateway import Location, LocationDeleteResponse ``` Methods: diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py index 806538130b4..dfbdc58aa72 100644 --- a/src/cloudflare/resources/zero_trust/gateway/locations.py +++ b/src/cloudflare/resources/zero_trust/gateway/locations.py @@ -24,7 +24,6 @@ from ...._base_client import AsyncPaginator, make_request_options from ....types.zero_trust.gateway import location_create_params, location_update_params from ....types.zero_trust.gateway.location import Location -from ....types.zero_trust.gateway.location_network_param import LocationNetworkParam from ....types.zero_trust.gateway.location_delete_response import LocationDeleteResponse __all__ = ["LocationsResource", "AsyncLocationsResource"] @@ -45,8 +44,9 @@ def create( account_id: str, name: str, client_default: bool | NotGiven = NOT_GIVEN, + dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - networks: Iterable[LocationNetworkParam] | NotGiven = NOT_GIVEN, + networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -62,9 +62,17 @@ def create( client_default: True if the location is the default location. + dns_destination_ips_id: The identifier of the pair of IPv4 addresses assigned to this location. When + creating a location, if this field is absent or set with null, the pair of + shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. + When updating a location, if the field is absent or set with null, the + pre-assigned pair remains unchanged. + ecs_support: True if the location needs to resolve EDNS queries. networks: A list of network ranges that requests from this location would originate from. + A non-empty list is only effective if the ipv4 endpoint is enabled for this + location. extra_headers: Send extra headers @@ -82,6 +90,7 @@ def create( { "name": name, "client_default": client_default, + "dns_destination_ips_id": dns_destination_ips_id, "ecs_support": ecs_support, "networks": networks, }, @@ -104,8 +113,9 @@ def update( account_id: str, name: str, client_default: bool | NotGiven = NOT_GIVEN, + dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - networks: Iterable[LocationNetworkParam] | NotGiven = NOT_GIVEN, + networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -121,9 +131,17 @@ def update( client_default: True if the location is the default location. + dns_destination_ips_id: The identifier of the pair of IPv4 addresses assigned to this location. When + creating a location, if this field is absent or set with null, the pair of + shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. + When updating a location, if the field is absent or set with null, the + pre-assigned pair remains unchanged. + ecs_support: True if the location needs to resolve EDNS queries. networks: A list of network ranges that requests from this location would originate from. + A non-empty list is only effective if the ipv4 endpoint is enabled for this + location. extra_headers: Send extra headers @@ -143,6 +161,7 @@ def update( { "name": name, "client_default": client_default, + "dns_destination_ips_id": dns_destination_ips_id, "ecs_support": ecs_support, "networks": networks, }, @@ -293,8 +312,9 @@ async def create( account_id: str, name: str, client_default: bool | NotGiven = NOT_GIVEN, + dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - networks: Iterable[LocationNetworkParam] | NotGiven = NOT_GIVEN, + networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -310,9 +330,17 @@ async def create( client_default: True if the location is the default location. + dns_destination_ips_id: The identifier of the pair of IPv4 addresses assigned to this location. When + creating a location, if this field is absent or set with null, the pair of + shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. + When updating a location, if the field is absent or set with null, the + pre-assigned pair remains unchanged. + ecs_support: True if the location needs to resolve EDNS queries. networks: A list of network ranges that requests from this location would originate from. + A non-empty list is only effective if the ipv4 endpoint is enabled for this + location. extra_headers: Send extra headers @@ -330,6 +358,7 @@ async def create( { "name": name, "client_default": client_default, + "dns_destination_ips_id": dns_destination_ips_id, "ecs_support": ecs_support, "networks": networks, }, @@ -352,8 +381,9 @@ async def update( account_id: str, name: str, client_default: bool | NotGiven = NOT_GIVEN, + dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - networks: Iterable[LocationNetworkParam] | NotGiven = NOT_GIVEN, + networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -369,9 +399,17 @@ async def update( client_default: True if the location is the default location. + dns_destination_ips_id: The identifier of the pair of IPv4 addresses assigned to this location. When + creating a location, if this field is absent or set with null, the pair of + shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. + When updating a location, if the field is absent or set with null, the + pre-assigned pair remains unchanged. + ecs_support: True if the location needs to resolve EDNS queries. networks: A list of network ranges that requests from this location would originate from. + A non-empty list is only effective if the ipv4 endpoint is enabled for this + location. extra_headers: Send extra headers @@ -391,6 +429,7 @@ async def update( { "name": name, "client_default": client_default, + "dns_destination_ips_id": dns_destination_ips_id, "ecs_support": ecs_support, "networks": networks, }, diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index e0f7ea5cf69..e9187691b1f 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -20,7 +20,6 @@ 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 from .list_update_params import ListUpdateParams as ListUpdateParams @@ -40,7 +39,6 @@ from .notification_settings import NotificationSettings as NotificationSettings from .body_scanning_settings import BodyScanningSettings as BodyScanningSettings from .location_create_params import LocationCreateParams as LocationCreateParams -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 diff --git a/src/cloudflare/types/zero_trust/gateway/location.py b/src/cloudflare/types/zero_trust/gateway/location.py index cf69688dc8b..4b76f631fc4 100644 --- a/src/cloudflare/types/zero_trust/gateway/location.py +++ b/src/cloudflare/types/zero_trust/gateway/location.py @@ -4,9 +4,97 @@ from datetime import datetime from ...._models import BaseModel -from .location_network import LocationNetwork -__all__ = ["Location"] +__all__ = [ + "Location", + "Endpoints", + "EndpointsDoh", + "EndpointsDohNetwork", + "EndpointsDot", + "EndpointsDotNetwork", + "EndpointsIPV4", + "EndpointsIPV6", + "EndpointsIPV6Network", + "Network", +] + + +class EndpointsDohNetwork(BaseModel): + network: str + """The IP address or IP CIDR.""" + + +class EndpointsDoh(BaseModel): + enabled: Optional[bool] = None + """True if the endpoint is enabled for this location.""" + + networks: Optional[List[EndpointsDohNetwork]] = None + """A list of allowed source IP network ranges for this endpoint. + + When empty, all source IPs are allowed. A non-empty list is only effective if + the endpoint is enabled for this location. + """ + + require_token: Optional[bool] = None + """ + True if the endpoint requires + [user identity](https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/agentless/dns/dns-over-https/#filter-doh-requests-by-user) + authentication. + """ + + +class EndpointsDotNetwork(BaseModel): + network: str + """The IP address or IP CIDR.""" + + +class EndpointsDot(BaseModel): + enabled: Optional[bool] = None + """True if the endpoint is enabled for this location.""" + + networks: Optional[List[EndpointsDotNetwork]] = None + """A list of allowed source IP network ranges for this endpoint. + + When empty, all source IPs are allowed. A non-empty list is only effective if + the endpoint is enabled for this location. + """ + + +class EndpointsIPV4(BaseModel): + enabled: Optional[bool] = None + """True if the endpoint is enabled for this location.""" + + +class EndpointsIPV6Network(BaseModel): + network: str + """The IPv6 address or IPv6 CIDR.""" + + +class EndpointsIPV6(BaseModel): + enabled: Optional[bool] = None + """True if the endpoint is enabled for this location.""" + + networks: Optional[List[EndpointsIPV6Network]] = None + """A list of allowed source IPv6 network ranges for this endpoint. + + When empty, all source IPs are allowed. A non-empty list is only effective if + the endpoint is enabled for this location. + """ + + +class Endpoints(BaseModel): + doh: Optional[EndpointsDoh] = None + + dot: Optional[EndpointsDot] = None + + ipv4: Optional[EndpointsIPV4] = None + + ipv6: Optional[EndpointsIPV6] = None + + +class Network(BaseModel): + network: str + """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" class Location(BaseModel): @@ -17,6 +105,9 @@ class Location(BaseModel): created_at: Optional[datetime] = None + dns_destination_ips_id: Optional[str] = None + """The identifier of the pair of IPv4 addresses assigned to this location.""" + doh_subdomain: Optional[str] = None """The DNS over HTTPS domain to send DNS requests to. @@ -26,6 +117,13 @@ class Location(BaseModel): ecs_support: Optional[bool] = None """True if the location needs to resolve EDNS queries.""" + endpoints: Optional[Endpoints] = None + """The destination endpoints configured for this location. + + When updating a location, if this field is absent or set with null, the + endpoints configuration remains unchanged. + """ + ip: Optional[str] = None """IPV6 destination ip assigned to this location. @@ -33,10 +131,26 @@ class Location(BaseModel): This field is auto-generated by Gateway. """ + ipv4_destination: Optional[str] = None + """ + The primary destination IPv4 address from the pair identified by the + dns_destination_ips_id. This field is read-only. + """ + + ipv4_destination_backup: Optional[str] = None + """ + The backup destination IPv4 address from the pair identified by the + dns_destination_ips_id. This field is read-only. + """ + name: Optional[str] = None """The name of the location.""" - networks: Optional[List[LocationNetwork]] = None - """A list of network ranges that requests from this location would originate from.""" + networks: Optional[List[Network]] = None + """A list of network ranges that requests from this location would originate from. + + A non-empty list is only effective if the ipv4 endpoint is enabled for this + location. + """ updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/location_create_params.py b/src/cloudflare/types/zero_trust/gateway/location_create_params.py index 183da6b0292..4fe3e12d541 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_create_params.py +++ b/src/cloudflare/types/zero_trust/gateway/location_create_params.py @@ -5,9 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .location_network_param import LocationNetworkParam - -__all__ = ["LocationCreateParams"] +__all__ = ["LocationCreateParams", "Network"] class LocationCreateParams(TypedDict, total=False): @@ -19,8 +17,26 @@ class LocationCreateParams(TypedDict, total=False): client_default: bool """True if the location is the default location.""" + dns_destination_ips_id: str + """The identifier of the pair of IPv4 addresses assigned to this location. + + When creating a location, if this field is absent or set with null, the pair of + shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. + When updating a location, if the field is absent or set with null, the + pre-assigned pair remains unchanged. + """ + ecs_support: bool """True if the location needs to resolve EDNS queries.""" - networks: Iterable[LocationNetworkParam] - """A list of network ranges that requests from this location would originate from.""" + networks: Iterable[Network] + """A list of network ranges that requests from this location would originate from. + + A non-empty list is only effective if the ipv4 endpoint is enabled for this + location. + """ + + +class Network(TypedDict, total=False): + network: Required[str] + """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" diff --git a/src/cloudflare/types/zero_trust/gateway/location_network.py b/src/cloudflare/types/zero_trust/gateway/location_network.py deleted file mode 100644 index 448729f3f29..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/location_network.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - - -from ...._models import BaseModel - -__all__ = ["LocationNetwork"] - - -class LocationNetwork(BaseModel): - network: str - """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" diff --git a/src/cloudflare/types/zero_trust/gateway/location_network_param.py b/src/cloudflare/types/zero_trust/gateway/location_network_param.py deleted file mode 100644 index e0328ee41ca..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/location_network_param.py +++ /dev/null @@ -1,12 +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__ = ["LocationNetworkParam"] - - -class LocationNetworkParam(TypedDict, total=False): - network: Required[str] - """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" diff --git a/src/cloudflare/types/zero_trust/gateway/location_update_params.py b/src/cloudflare/types/zero_trust/gateway/location_update_params.py index f563e09fa0f..5878d373749 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_update_params.py +++ b/src/cloudflare/types/zero_trust/gateway/location_update_params.py @@ -5,9 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .location_network_param import LocationNetworkParam - -__all__ = ["LocationUpdateParams"] +__all__ = ["LocationUpdateParams", "Network"] class LocationUpdateParams(TypedDict, total=False): @@ -19,8 +17,26 @@ class LocationUpdateParams(TypedDict, total=False): client_default: bool """True if the location is the default location.""" + dns_destination_ips_id: str + """The identifier of the pair of IPv4 addresses assigned to this location. + + When creating a location, if this field is absent or set with null, the pair of + shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. + When updating a location, if the field is absent or set with null, the + pre-assigned pair remains unchanged. + """ + ecs_support: bool """True if the location needs to resolve EDNS queries.""" - networks: Iterable[LocationNetworkParam] - """A list of network ranges that requests from this location would originate from.""" + networks: Iterable[Network] + """A list of network ranges that requests from this location would originate from. + + A non-empty list is only effective if the ipv4 endpoint is enabled for this + location. + """ + + +class Network(TypedDict, total=False): + network: Required[str] + """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py index 9cc5069d7ef..7855e8d9089 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -35,6 +35,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, + dns_destination_ips_id="0e4a32c6-6fb8-4858-9296-98f51631e8e6", ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) @@ -90,6 +91,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, + dns_destination_ips_id="0e4a32c6-6fb8-4858-9296-98f51631e8e6", ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) @@ -291,6 +293,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, + dns_destination_ips_id="0e4a32c6-6fb8-4858-9296-98f51631e8e6", ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) @@ -346,6 +349,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, + dns_destination_ips_id="0e4a32c6-6fb8-4858-9296-98f51631e8e6", ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) From 74cd67c1d52e37daae3c56d32c93a3a4de6365d0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 18:11:49 +0000 Subject: [PATCH 287/316] 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 60b6da89c5d..e12d9084486 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-376cc25a50d22c4ac996448cf4e073f8b1065424b312a46422d1eb663491e28a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-679167edf32571d5f0fe206d0e3cbf3e10dff2b29d5095c9593e5bd534b6cfb1.yml From 7ae4e71c470086e80e8cb1d47d9536f20b1c6092 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 18:52:35 +0000 Subject: [PATCH 288/316] feat(api): OpenAPI spec update via Stainless API (#1185) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e12d9084486..460712b2177 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-679167edf32571d5f0fe206d0e3cbf3e10dff2b29d5095c9593e5bd534b6cfb1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1c6ef4fb324b6507af8b79469a4b1e63bf323a0a7736cdcd39ae9d1217ed5fe.yml From 84d7b0dc1a0d7ad3eade4ef567167f3cac827496 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 18:58:43 +0000 Subject: [PATCH 289/316] feat(api): OpenAPI spec update via Stainless API (#1186) --- .stats.yml | 2 +- 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 ------ 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 ------ 21 files changed, 1 insertion(+), 121 deletions(-) diff --git a/.stats.yml b/.stats.yml index 460712b2177..b4d9bc39c4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1c6ef4fb324b6507af8b79469a4b1e63bf323a0a7736cdcd39ae9d1217ed5fe.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9e968f2bf05402754affac40563fb49a9f7979ad72579fd407bedb0ba702ff5.yml diff --git a/src/cloudflare/types/dns/a_record.py b/src/cloudflare/types/dns/a_record.py index c42be657c7c..33011fe5efe 100644 --- a/src/cloudflare/types/dns/a_record.py +++ b/src/cloudflare/types/dns/a_record.py @@ -34,12 +34,6 @@ class ARecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/aaaa_record.py b/src/cloudflare/types/dns/aaaa_record.py index 4e4bd1218e6..a18b95d8b06 100644 --- a/src/cloudflare/types/dns/aaaa_record.py +++ b/src/cloudflare/types/dns/aaaa_record.py @@ -34,12 +34,6 @@ class AAAARecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/caa_record.py b/src/cloudflare/types/dns/caa_record.py index e81689a332e..651ab47480b 100644 --- a/src/cloudflare/types/dns/caa_record.py +++ b/src/cloudflare/types/dns/caa_record.py @@ -48,12 +48,6 @@ class CAARecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/cert_record.py b/src/cloudflare/types/dns/cert_record.py index 58c471f4c7f..0aa1f0e3a27 100644 --- a/src/cloudflare/types/dns/cert_record.py +++ b/src/cloudflare/types/dns/cert_record.py @@ -51,12 +51,6 @@ class CERTRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/cname_record.py b/src/cloudflare/types/dns/cname_record.py index 9c034629645..d7b6d9b1073 100644 --- a/src/cloudflare/types/dns/cname_record.py +++ b/src/cloudflare/types/dns/cname_record.py @@ -34,12 +34,6 @@ class CNAMERecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/dnskey_record.py b/src/cloudflare/types/dns/dnskey_record.py index 72c2ae66d67..75621b33783 100644 --- a/src/cloudflare/types/dns/dnskey_record.py +++ b/src/cloudflare/types/dns/dnskey_record.py @@ -51,12 +51,6 @@ class DNSKEYRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/ds_record.py b/src/cloudflare/types/dns/ds_record.py index d6210dce096..af3abd1f1ec 100644 --- a/src/cloudflare/types/dns/ds_record.py +++ b/src/cloudflare/types/dns/ds_record.py @@ -51,12 +51,6 @@ class DSRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/https_record.py b/src/cloudflare/types/dns/https_record.py index 6900410e735..42121b3fc3a 100644 --- a/src/cloudflare/types/dns/https_record.py +++ b/src/cloudflare/types/dns/https_record.py @@ -48,12 +48,6 @@ class HTTPSRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/loc_record.py b/src/cloudflare/types/dns/loc_record.py index 5d4f84c06b7..5608a4701fc 100644 --- a/src/cloudflare/types/dns/loc_record.py +++ b/src/cloudflare/types/dns/loc_record.py @@ -75,12 +75,6 @@ class LOCRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/mx_record.py b/src/cloudflare/types/dns/mx_record.py index 3722755f904..c1d1f3aba97 100644 --- a/src/cloudflare/types/dns/mx_record.py +++ b/src/cloudflare/types/dns/mx_record.py @@ -40,12 +40,6 @@ class MXRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/naptr_record.py b/src/cloudflare/types/dns/naptr_record.py index 0dc8a697aca..796caffdbb9 100644 --- a/src/cloudflare/types/dns/naptr_record.py +++ b/src/cloudflare/types/dns/naptr_record.py @@ -57,12 +57,6 @@ class NAPTRRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/ns_record.py b/src/cloudflare/types/dns/ns_record.py index 0b60f0a307f..b9ad8683302 100644 --- a/src/cloudflare/types/dns/ns_record.py +++ b/src/cloudflare/types/dns/ns_record.py @@ -34,12 +34,6 @@ class NSRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/ptr_record.py b/src/cloudflare/types/dns/ptr_record.py index d5835b62faf..e83d664a949 100644 --- a/src/cloudflare/types/dns/ptr_record.py +++ b/src/cloudflare/types/dns/ptr_record.py @@ -34,12 +34,6 @@ class PTRRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/smimea_record.py b/src/cloudflare/types/dns/smimea_record.py index a8393cee684..8fadd271738 100644 --- a/src/cloudflare/types/dns/smimea_record.py +++ b/src/cloudflare/types/dns/smimea_record.py @@ -51,12 +51,6 @@ class SMIMEARecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/srv_record.py b/src/cloudflare/types/dns/srv_record.py index 43c8df32709..77dbaa50cfb 100644 --- a/src/cloudflare/types/dns/srv_record.py +++ b/src/cloudflare/types/dns/srv_record.py @@ -83,12 +83,6 @@ class SRVRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/sshfp_record.py b/src/cloudflare/types/dns/sshfp_record.py index 3541eefc8c6..aad44a8cb6b 100644 --- a/src/cloudflare/types/dns/sshfp_record.py +++ b/src/cloudflare/types/dns/sshfp_record.py @@ -48,12 +48,6 @@ class SSHFPRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/svcb_record.py b/src/cloudflare/types/dns/svcb_record.py index db981322f9d..a503e64e925 100644 --- a/src/cloudflare/types/dns/svcb_record.py +++ b/src/cloudflare/types/dns/svcb_record.py @@ -48,12 +48,6 @@ class SVCBRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/tlsa_record.py b/src/cloudflare/types/dns/tlsa_record.py index 1d2c1600bad..68b273d28d5 100644 --- a/src/cloudflare/types/dns/tlsa_record.py +++ b/src/cloudflare/types/dns/tlsa_record.py @@ -51,12 +51,6 @@ class TLSARecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/txt_record.py b/src/cloudflare/types/dns/txt_record.py index 3eb3f3402f2..7ba595ed654 100644 --- a/src/cloudflare/types/dns/txt_record.py +++ b/src/cloudflare/types/dns/txt_record.py @@ -34,12 +34,6 @@ class TXTRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" diff --git a/src/cloudflare/types/dns/uri_record.py b/src/cloudflare/types/dns/uri_record.py index ce953c709d0..6cd8c686f18 100644 --- a/src/cloudflare/types/dns/uri_record.py +++ b/src/cloudflare/types/dns/uri_record.py @@ -51,12 +51,6 @@ class URIRecord(BaseModel): created_on: Optional[datetime] = None """When the record was created.""" - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - meta: Optional[RecordMetadata] = None """Extra Cloudflare-specific information about the record.""" From 1022f3066bf2e65457ef9a0d8f969f87a1e20b94 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 19:12:03 +0000 Subject: [PATCH 290/316] feat(api): OpenAPI spec update via Stainless API (#1187) --- .stats.yml | 2 +- src/cloudflare/resources/workers/ai/ai.py | 166 +++++----- src/cloudflare/types/workers/ai_run_params.py | 46 ++- .../types/workers/ai_run_response.py | 1 - tests/api_resources/workers/test_ai.py | 306 ++++++------------ 5 files changed, 200 insertions(+), 321 deletions(-) diff --git a/.stats.yml b/.stats.yml index b4d9bc39c4a..35a7dcb730a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9e968f2bf05402754affac40563fb49a9f7979ad72579fd407bedb0ba702ff5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c1304c4f3acd7dbe8b476827fe5df13055ab6634accc43a8edbbb82e1208a98.yml diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index a3685c12491..673262c5fed 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -50,42 +50,6 @@ def with_raw_response(self) -> AIResourceWithRawResponse: def with_streaming_response(self) -> AIResourceWithStreamingResponse: return AIResourceWithStreamingResponse(self) - @overload - def run( - self, - model_name: 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, - ) -> Optional[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - ... - @overload def run( self, @@ -367,7 +331,7 @@ def run( model_name: str, *, account_id: str, - messages: Iterable[ai_run_params.Variant8Message], + messages: Iterable[ai_run_params.Variant7Message], frequency_penalty: float | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, presence_penalty: float | NotGiven = NOT_GIVEN, @@ -375,7 +339,7 @@ def run( seed: int | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, temperature: float | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -524,7 +488,6 @@ def run( ... @required_args( - ["account_id", "body"], ["account_id", "text"], ["account_id", "prompt"], ["account_id", "audio"], @@ -539,7 +502,6 @@ def run( model_name: str, *, account_id: str, - body: object | NotGiven = NOT_GIVEN, text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, @@ -565,8 +527,8 @@ def run( temperature: float | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.Variant8Message] | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.Variant7Message] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, @@ -586,7 +548,42 @@ def run( Optional[AIRunResponse], self._post( f"/accounts/{account_id}/ai/run/{model_name}", - body=maybe_transform(body, ai_run_params.AIRunParams), + body=maybe_transform( + { + "text": text, + "prompt": prompt, + "guidance": guidance, + "height": height, + "image": image, + "image_b64": image_b64, + "lora_weights": lora_weights, + "loras": loras, + "mask": mask, + "negative_prompt": negative_prompt, + "num_steps": num_steps, + "seed": seed, + "strength": strength, + "width": width, + "audio": audio, + "frequency_penalty": frequency_penalty, + "lora": lora, + "max_tokens": max_tokens, + "presence_penalty": presence_penalty, + "raw": raw, + "repetition_penalty": repetition_penalty, + "stream": stream, + "temperature": temperature, + "top_k": top_k, + "top_p": top_p, + "messages": messages, + "tools": tools, + "target_lang": target_lang, + "source_lang": source_lang, + "input_text": input_text, + "max_length": max_length, + }, + ai_run_params.AIRunParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -614,42 +611,6 @@ def with_raw_response(self) -> AsyncAIResourceWithRawResponse: def with_streaming_response(self) -> AsyncAIResourceWithStreamingResponse: return AsyncAIResourceWithStreamingResponse(self) - @overload - async def run( - self, - model_name: 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, - ) -> Optional[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - ... - @overload async def run( self, @@ -931,7 +892,7 @@ async def run( model_name: str, *, account_id: str, - messages: Iterable[ai_run_params.Variant8Message], + messages: Iterable[ai_run_params.Variant7Message], frequency_penalty: float | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, presence_penalty: float | NotGiven = NOT_GIVEN, @@ -939,7 +900,7 @@ async def run( seed: int | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, temperature: float | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1088,7 +1049,6 @@ async def run( ... @required_args( - ["account_id", "body"], ["account_id", "text"], ["account_id", "prompt"], ["account_id", "audio"], @@ -1103,7 +1063,6 @@ async def run( model_name: str, *, account_id: str, - body: object | NotGiven = NOT_GIVEN, text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, @@ -1129,8 +1088,8 @@ async def run( temperature: float | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.Variant8Message] | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.Variant7Message] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, @@ -1150,7 +1109,42 @@ async def run( Optional[AIRunResponse], await self._post( f"/accounts/{account_id}/ai/run/{model_name}", - body=await async_maybe_transform(body, ai_run_params.AIRunParams), + body=await async_maybe_transform( + { + "text": text, + "prompt": prompt, + "guidance": guidance, + "height": height, + "image": image, + "image_b64": image_b64, + "lora_weights": lora_weights, + "loras": loras, + "mask": mask, + "negative_prompt": negative_prompt, + "num_steps": num_steps, + "seed": seed, + "strength": strength, + "width": width, + "audio": audio, + "frequency_penalty": frequency_penalty, + "lora": lora, + "max_tokens": max_tokens, + "presence_penalty": presence_penalty, + "raw": raw, + "repetition_penalty": repetition_penalty, + "stream": stream, + "temperature": temperature, + "top_k": top_k, + "top_p": top_p, + "messages": messages, + "tools": tools, + "target_lang": target_lang, + "source_lang": source_lang, + "input_text": input_text, + "max_length": max_length, + }, + ai_run_params.AIRunParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 835090f17db..788ee5867fb 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -7,20 +7,19 @@ __all__ = [ "AIRunParams", - "DumbPipe", "TextClassification", "TextToImage", "TextEmbeddings", "AutomaticSpeechRecognition", "ImageClassification", "ObjectDetection", + "Variant6", "Variant7", - "Variant8", - "Variant8Message", - "Variant8Tool", - "Variant8ToolFunction", - "Variant8ToolFunctionParameters", - "Variant8ToolFunctionParametersProperties", + "Variant7Message", + "Variant7Tool", + "Variant7ToolFunction", + "Variant7ToolFunctionParameters", + "Variant7ToolFunctionParametersProperties", "Translation", "Summarization", "ImageToText", @@ -28,12 +27,6 @@ ] -class DumbPipe(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] - - class TextClassification(TypedDict, total=False): account_id: Required[str] @@ -94,7 +87,7 @@ class ObjectDetection(TypedDict, total=False): image: Iterable[float] -class Variant7(TypedDict, total=False): +class Variant6(TypedDict, total=False): account_id: Required[str] prompt: Required[str] @@ -122,10 +115,10 @@ class Variant7(TypedDict, total=False): top_p: float -class Variant8(TypedDict, total=False): +class Variant7(TypedDict, total=False): account_id: Required[str] - messages: Required[Iterable[Variant8Message]] + messages: Required[Iterable[Variant7Message]] frequency_penalty: float @@ -141,43 +134,43 @@ class Variant8(TypedDict, total=False): temperature: float - tools: Iterable[Variant8Tool] + tools: Iterable[Variant7Tool] top_k: int top_p: float -class Variant8Message(TypedDict, total=False): +class Variant7Message(TypedDict, total=False): content: Required[str] role: Required[str] -class Variant8ToolFunctionParametersProperties(TypedDict, total=False): +class Variant7ToolFunctionParametersProperties(TypedDict, total=False): description: str type: str -class Variant8ToolFunctionParameters(TypedDict, total=False): - properties: Dict[str, Variant8ToolFunctionParametersProperties] +class Variant7ToolFunctionParameters(TypedDict, total=False): + properties: Dict[str, Variant7ToolFunctionParametersProperties] required: List[str] type: str -class Variant8ToolFunction(TypedDict, total=False): +class Variant7ToolFunction(TypedDict, total=False): description: str name: str - parameters: Variant8ToolFunctionParameters + parameters: Variant7ToolFunctionParameters -class Variant8Tool(TypedDict, total=False): - function: Variant8ToolFunction +class Variant7Tool(TypedDict, total=False): + function: Variant7ToolFunction type: str @@ -223,15 +216,14 @@ class ImageToTextMessage(TypedDict, total=False): AIRunParams = Union[ - DumbPipe, TextClassification, TextToImage, TextEmbeddings, AutomaticSpeechRecognition, ImageClassification, ObjectDetection, + Variant6, Variant7, - Variant8, Translation, Summarization, ImageToText, diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 004acc6feea..953b41873a5 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -111,5 +111,4 @@ class ImageToText(BaseModel): Translation, Summarization, ImageToText, - object, ] diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index 5af829b9c8c..e67bf0eee20 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -19,59 +19,6 @@ class TestAI: @parametrize def test_method_run_overload_1(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: - response = client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_run_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="", - body={}, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - model_name="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - @parametrize - def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -80,7 +27,7 @@ def test_method_run_overload_2(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -93,7 +40,7 @@ def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -108,7 +55,7 @@ def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_2(self, client: Cloudflare) -> None: + def test_path_params_run_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -124,7 +71,7 @@ def test_path_params_run_overload_2(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_3(self, client: Cloudflare) -> None: + def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -133,7 +80,7 @@ def test_method_run_overload_3(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -154,7 +101,7 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -167,7 +114,7 @@ def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -182,7 +129,7 @@ def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_3(self, client: Cloudflare) -> None: + def test_path_params_run_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -198,7 +145,7 @@ def test_path_params_run_overload_3(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_4(self, client: Cloudflare) -> None: + def test_method_run_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -207,7 +154,7 @@ def test_method_run_overload_4(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -220,7 +167,7 @@ def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -235,7 +182,7 @@ def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_4(self, client: Cloudflare) -> None: + def test_path_params_run_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -251,7 +198,7 @@ def test_path_params_run_overload_4(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_5(self, client: Cloudflare) -> None: + def test_method_run_overload_4(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -260,7 +207,7 @@ def test_method_run_overload_5(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -273,7 +220,7 @@ def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -288,7 +235,7 @@ def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_5(self, client: Cloudflare) -> None: + def test_path_params_run_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -304,7 +251,7 @@ def test_path_params_run_overload_5(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_6(self, client: Cloudflare) -> None: + def test_method_run_overload_5(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -313,7 +260,7 @@ def test_method_run_overload_6(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -326,7 +273,7 @@ def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -341,7 +288,7 @@ def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_6(self, client: Cloudflare) -> None: + def test_path_params_run_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -357,7 +304,7 @@ def test_path_params_run_overload_6(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_7(self, client: Cloudflare) -> None: + def test_method_run_overload_6(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -365,7 +312,7 @@ def test_method_run_overload_7(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_6(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -374,7 +321,7 @@ def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -386,7 +333,7 @@ def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -400,7 +347,7 @@ def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_7(self, client: Cloudflare) -> None: + def test_path_params_run_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -414,7 +361,7 @@ def test_path_params_run_overload_7(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_8(self, client: Cloudflare) -> None: + def test_method_run_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -423,7 +370,7 @@ def test_method_run_overload_8(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -443,7 +390,7 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -456,7 +403,7 @@ def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -471,7 +418,7 @@ def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_8(self, client: Cloudflare) -> None: + def test_path_params_run_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -487,7 +434,7 @@ def test_path_params_run_overload_8(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_9(self, client: Cloudflare) -> None: + def test_method_run_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -509,7 +456,7 @@ def test_method_run_overload_9(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -593,7 +540,7 @@ def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -619,7 +566,7 @@ def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -647,7 +594,7 @@ def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_9(self, client: Cloudflare) -> None: + def test_path_params_run_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -689,7 +636,7 @@ def test_path_params_run_overload_9(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_10(self, client: Cloudflare) -> None: + def test_method_run_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -699,7 +646,7 @@ def test_method_run_overload_10(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -710,7 +657,7 @@ def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -724,7 +671,7 @@ def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -740,7 +687,7 @@ def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_10(self, client: Cloudflare) -> None: + def test_path_params_run_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -758,7 +705,7 @@ def test_path_params_run_overload_10(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_11(self, client: Cloudflare) -> None: + def test_method_run_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -767,7 +714,7 @@ def test_method_run_overload_11(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -777,7 +724,7 @@ def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -790,7 +737,7 @@ def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -805,7 +752,7 @@ def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_11(self, client: Cloudflare) -> None: + def test_path_params_run_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -821,7 +768,7 @@ def test_path_params_run_overload_11(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_12(self, client: Cloudflare) -> None: + def test_method_run_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -830,7 +777,7 @@ def test_method_run_overload_12(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_12(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -857,7 +804,7 @@ def test_method_run_with_all_params_overload_12(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_12(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -870,7 +817,7 @@ def test_raw_response_run_overload_12(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_12(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -885,7 +832,7 @@ def test_streaming_response_run_overload_12(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_12(self, client: Cloudflare) -> None: + def test_path_params_run_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -906,59 +853,6 @@ class TestAsyncAI: @parametrize async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: - response = await async_client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: - async with async_client.workers.ai.with_streaming_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="", - body={}, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - await async_client.workers.ai.with_raw_response.run( - model_name="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - @parametrize - async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -967,7 +861,7 @@ async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -980,7 +874,7 @@ async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -995,7 +889,7 @@ async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1011,7 +905,7 @@ async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1020,7 +914,7 @@ async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1041,7 +935,7 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1054,7 +948,7 @@ async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1069,7 +963,7 @@ async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1085,7 +979,7 @@ async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1094,7 +988,7 @@ async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1107,7 +1001,7 @@ async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1122,7 +1016,7 @@ async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1138,7 +1032,7 @@ async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1147,7 +1041,7 @@ async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1160,7 +1054,7 @@ async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1175,7 +1069,7 @@ async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1191,7 +1085,7 @@ async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1200,7 +1094,7 @@ async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1213,7 +1107,7 @@ async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1228,7 +1122,7 @@ async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1244,7 +1138,7 @@ async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1252,7 +1146,7 @@ async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1261,7 +1155,7 @@ async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1273,7 +1167,7 @@ async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1287,7 +1181,7 @@ async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1301,7 +1195,7 @@ async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1310,7 +1204,7 @@ async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1330,7 +1224,7 @@ async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1343,7 +1237,7 @@ async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1358,7 +1252,7 @@ async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1374,7 +1268,7 @@ async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1396,7 +1290,7 @@ async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1480,7 +1374,7 @@ async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1506,7 +1400,7 @@ async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1534,7 +1428,7 @@ async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1576,7 +1470,7 @@ async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1586,7 +1480,7 @@ async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1597,7 +1491,7 @@ async def test_method_run_with_all_params_overload_10(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1611,7 +1505,7 @@ async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1627,7 +1521,7 @@ async def test_streaming_response_run_overload_10(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1645,7 +1539,7 @@ async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) ) @parametrize - async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1654,7 +1548,7 @@ async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1664,7 +1558,7 @@ async def test_method_run_with_all_params_overload_11(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1677,7 +1571,7 @@ async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1692,7 +1586,7 @@ async def test_streaming_response_run_overload_11(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1708,7 +1602,7 @@ async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) ) @parametrize - async def test_method_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1717,7 +1611,7 @@ async def test_method_run_overload_12(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1744,7 +1638,7 @@ async def test_method_run_with_all_params_overload_12(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1757,7 +1651,7 @@ async def test_raw_response_run_overload_12(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1772,7 +1666,7 @@ async def test_streaming_response_run_overload_12(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", From c2e0647bafd5baa13fdb71f379978e59d38aabbf Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 15 Jul 2024 19:14:12 +0000 Subject: [PATCH 291/316] 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 35a7dcb730a..b74781a6893 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c1304c4f3acd7dbe8b476827fe5df13055ab6634accc43a8edbbb82e1208a98.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bc261aaae82e045d5b257d76a8e4dedcc8102a8b20f0d32d091e41296624124.yml From 90ce238bfabfc0182f8f8dabf5cbc9ae84a15c91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:14:47 +0000 Subject: [PATCH 292/316] feat(api): OpenAPI spec update via Stainless API (#1188) --- .stats.yml | 2 +- .../types/hyperdrive/configuration.py | 10 +++++--- .../types/hyperdrive/configuration_param.py | 9 ++++--- .../api_resources/hyperdrive/test_configs.py | 24 +++++-------------- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/.stats.yml b/.stats.yml index b74781a6893..b0ac00b54b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bc261aaae82e045d5b257d76a8e4dedcc8102a8b20f0d32d091e41296624124.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8698fc16cc1cd7549c7f51bf3f3118b80e198b25fee1f20e4aaeb226608dafd1.yml diff --git a/src/cloudflare/types/hyperdrive/configuration.py b/src/cloudflare/types/hyperdrive/configuration.py index 68c745a34de..5a6158e9e95 100644 --- a/src/cloudflare/types/hyperdrive/configuration.py +++ b/src/cloudflare/types/hyperdrive/configuration.py @@ -1,5 +1,6 @@ # 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 @@ -14,11 +15,14 @@ class Configuration(BaseModel): host: str """The host (hostname or IP) of your origin database.""" - port: int - """The port (default: 5432 for Postgres) of your origin database.""" - scheme: Literal["postgres", "postgresql", "mysql"] """Specifies the URL scheme used to connect to your origin database.""" user: str """The user of your origin database.""" + + access_client_id: Optional[str] = None + """The Client ID of the Access token to use when connecting to the origin database""" + + port: Optional[int] = None + """The port (default: 5432 for Postgres) of your origin database.""" diff --git a/src/cloudflare/types/hyperdrive/configuration_param.py b/src/cloudflare/types/hyperdrive/configuration_param.py index 02bca1d6527..bd751b98e04 100644 --- a/src/cloudflare/types/hyperdrive/configuration_param.py +++ b/src/cloudflare/types/hyperdrive/configuration_param.py @@ -14,11 +14,14 @@ class ConfigurationParam(TypedDict, total=False): host: Required[str] """The host (hostname or IP) of your origin database.""" - port: Required[int] - """The port (default: 5432 for Postgres) of your origin database.""" - scheme: Required[Literal["postgres", "postgresql", "mysql"]] """Specifies the URL scheme used to connect to your origin database.""" user: Required[str] """The user of your origin database.""" + + access_client_id: str + """The Client ID of the Access token to use when connecting to the origin database""" + + port: int + """The port (default: 5432 for Postgres) of your origin database.""" diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index a6edc5fb868..bb89f9ec1a4 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -30,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -44,6 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -67,7 +67,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -87,7 +86,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -110,7 +108,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -126,7 +123,6 @@ def test_method_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -141,6 +137,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -165,7 +162,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -186,7 +182,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -210,7 +205,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -224,7 +218,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -338,6 +331,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: }, name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -451,7 +445,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -465,6 +458,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -488,7 +482,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -508,7 +501,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -531,7 +523,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -547,7 +538,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -562,6 +552,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -586,7 +577,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -607,7 +597,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -631,7 +620,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -645,7 +633,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -759,6 +746,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) }, name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, From cf972bbbe25203a42bfc9f9b6c80a0aac64a30dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:43:04 +0000 Subject: [PATCH 293/316] feat(api): update via SDK Studio (#1189) --- .../types/zero_trust/gateway/location.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cloudflare/types/zero_trust/gateway/location.py b/src/cloudflare/types/zero_trust/gateway/location.py index 4b76f631fc4..ae5690f7331 100644 --- a/src/cloudflare/types/zero_trust/gateway/location.py +++ b/src/cloudflare/types/zero_trust/gateway/location.py @@ -8,10 +8,10 @@ __all__ = [ "Location", "Endpoints", - "EndpointsDoh", - "EndpointsDohNetwork", - "EndpointsDot", - "EndpointsDotNetwork", + "EndpointsDOH", + "EndpointsDOHNetwork", + "EndpointsDOT", + "EndpointsDOTNetwork", "EndpointsIPV4", "EndpointsIPV6", "EndpointsIPV6Network", @@ -19,16 +19,16 @@ ] -class EndpointsDohNetwork(BaseModel): +class EndpointsDOHNetwork(BaseModel): network: str """The IP address or IP CIDR.""" -class EndpointsDoh(BaseModel): +class EndpointsDOH(BaseModel): enabled: Optional[bool] = None """True if the endpoint is enabled for this location.""" - networks: Optional[List[EndpointsDohNetwork]] = None + networks: Optional[List[EndpointsDOHNetwork]] = None """A list of allowed source IP network ranges for this endpoint. When empty, all source IPs are allowed. A non-empty list is only effective if @@ -43,16 +43,16 @@ class EndpointsDoh(BaseModel): """ -class EndpointsDotNetwork(BaseModel): +class EndpointsDOTNetwork(BaseModel): network: str """The IP address or IP CIDR.""" -class EndpointsDot(BaseModel): +class EndpointsDOT(BaseModel): enabled: Optional[bool] = None """True if the endpoint is enabled for this location.""" - networks: Optional[List[EndpointsDotNetwork]] = None + networks: Optional[List[EndpointsDOTNetwork]] = None """A list of allowed source IP network ranges for this endpoint. When empty, all source IPs are allowed. A non-empty list is only effective if @@ -83,9 +83,9 @@ class EndpointsIPV6(BaseModel): class Endpoints(BaseModel): - doh: Optional[EndpointsDoh] = None + doh: Optional[EndpointsDOH] = None - dot: Optional[EndpointsDot] = None + dot: Optional[EndpointsDOT] = None ipv4: Optional[EndpointsIPV4] = None From fd61b0dd320d0bd6f93ed03783a739ee0145629b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 00:50:53 +0000 Subject: [PATCH 294/316] feat(api): update via SDK Studio --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b0ac00b54b3..f3b95b13c24 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8698fc16cc1cd7549c7f51bf3f3118b80e198b25fee1f20e4aaeb226608dafd1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-72ed5287be2b296a82b8b905e14f6a722102254af0f3a550d1a230a75c40fdd4.yml From c309481bf9454776b16a1c6ab666aa73f1a13d7c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 00:57:56 +0000 Subject: [PATCH 295/316] feat(api): update via SDK Studio --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f3b95b13c24..b0ac00b54b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-72ed5287be2b296a82b8b905e14f6a722102254af0f3a550d1a230a75c40fdd4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8698fc16cc1cd7549c7f51bf3f3118b80e198b25fee1f20e4aaeb226608dafd1.yml From a2955c5da1ec6e6a0d6205c6bc33e19040fb98d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 08:51:54 +0000 Subject: [PATCH 296/316] feat(api): OpenAPI spec update via Stainless API (#1190) --- .stats.yml | 2 +- .../resources/dns/firewall/firewall.py | 44 ++++++++++++++----- src/cloudflare/types/dns/firewall/firewall.py | 20 +++++++-- .../types/dns/firewall_create_params.py | 20 +++++++-- .../types/dns/firewall_edit_params.py | 20 +++++++-- 5 files changed, 84 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index b0ac00b54b3..59fa19c430a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8698fc16cc1cd7549c7f51bf3f3118b80e198b25fee1f20e4aaeb226608dafd1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-129ae207bac48d5f0a569cefeb5ff52209e7ef746666eb4e8f72aeb08a7748aa.yml diff --git a/src/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py index 550d2bab98b..608e46bb270 100644 --- a/src/cloudflare/resources/dns/firewall/firewall.py +++ b/src/cloudflare/resources/dns/firewall/firewall.py @@ -89,11 +89,16 @@ def create( ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. - maximum_cache_ttl: Maximum DNS Cache TTL. + maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Higher TTLs will be + decreased to the maximum defined here for caching purposes. - minimum_cache_ttl: Minimum DNS Cache TTL. + minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Lower TTLs will be + increased to the minimum defined here for caching purposes. - negative_cache_ttl: Negative DNS Cache TTL. + negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache + negative responses (e.g., NXDOMAIN) from the upstream servers. ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). @@ -272,15 +277,20 @@ def edit( ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. - maximum_cache_ttl: Maximum DNS Cache TTL. + maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Higher TTLs will be + decreased to the maximum defined here for caching purposes. - minimum_cache_ttl: Minimum DNS Cache TTL. + minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Lower TTLs will be + increased to the minimum defined here for caching purposes. name: DNS Firewall Cluster Name. attack_mitigation: Attack mitigation settings. - negative_cache_ttl: Negative DNS Cache TTL. + negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache + negative responses (e.g., NXDOMAIN) from the upstream servers. ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). @@ -422,11 +432,16 @@ async def create( ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. - maximum_cache_ttl: Maximum DNS Cache TTL. + maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Higher TTLs will be + decreased to the maximum defined here for caching purposes. - minimum_cache_ttl: Minimum DNS Cache TTL. + minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Lower TTLs will be + increased to the minimum defined here for caching purposes. - negative_cache_ttl: Negative DNS Cache TTL. + negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache + negative responses (e.g., NXDOMAIN) from the upstream servers. ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). @@ -605,15 +620,20 @@ async def edit( ecs_fallback: Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. - maximum_cache_ttl: Maximum DNS Cache TTL. + maximum_cache_ttl: Maximum DNS cache TTL. This setting sets an upper bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Higher TTLs will be + decreased to the maximum defined here for caching purposes. - minimum_cache_ttl: Minimum DNS Cache TTL. + minimum_cache_ttl: Minimum DNS cache TTL. This setting sets a lower bound on DNS TTLs for purposes + of caching between DNS Firewall and the upstream servers. Lower TTLs will be + increased to the minimum defined here for caching purposes. name: DNS Firewall Cluster Name. attack_mitigation: Attack mitigation settings. - negative_cache_ttl: Negative DNS Cache TTL. + negative_cache_ttl: Negative DNS cache TTL. This setting controls how long DNS Firewall should cache + negative responses (e.g., NXDOMAIN) from the upstream servers. ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). diff --git a/src/cloudflare/types/dns/firewall/firewall.py b/src/cloudflare/types/dns/firewall/firewall.py index 8e35b4399da..3ab282e0310 100644 --- a/src/cloudflare/types/dns/firewall/firewall.py +++ b/src/cloudflare/types/dns/firewall/firewall.py @@ -24,10 +24,20 @@ class Firewall(BaseModel): """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.""" maximum_cache_ttl: float - """Maximum DNS Cache TTL.""" + """Maximum DNS cache TTL. + + This setting sets an upper bound on DNS TTLs for purposes of caching between DNS + Firewall and the upstream servers. Higher TTLs will be decreased to the maximum + defined here for caching purposes. + """ minimum_cache_ttl: float - """Minimum DNS Cache TTL.""" + """Minimum DNS cache TTL. + + This setting sets a lower bound on DNS TTLs for purposes of caching between DNS + Firewall and the upstream servers. Lower TTLs will be increased to the minimum + defined here for caching purposes. + """ modified_on: datetime """Last modification of DNS Firewall cluster.""" @@ -41,7 +51,11 @@ class Firewall(BaseModel): """Attack mitigation settings.""" negative_cache_ttl: Optional[float] = None - """Negative DNS Cache TTL.""" + """Negative DNS cache TTL. + + This setting controls how long DNS Firewall should cache negative responses + (e.g., NXDOMAIN) from the upstream servers. + """ ratelimit: Optional[float] = None """ diff --git a/src/cloudflare/types/dns/firewall_create_params.py b/src/cloudflare/types/dns/firewall_create_params.py index d88aa2d120c..9c2e530b9d0 100644 --- a/src/cloudflare/types/dns/firewall_create_params.py +++ b/src/cloudflare/types/dns/firewall_create_params.py @@ -30,13 +30,27 @@ class FirewallCreateParams(TypedDict, total=False): """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.""" maximum_cache_ttl: float - """Maximum DNS Cache TTL.""" + """Maximum DNS cache TTL. + + This setting sets an upper bound on DNS TTLs for purposes of caching between DNS + Firewall and the upstream servers. Higher TTLs will be decreased to the maximum + defined here for caching purposes. + """ minimum_cache_ttl: float - """Minimum DNS Cache TTL.""" + """Minimum DNS cache TTL. + + This setting sets a lower bound on DNS TTLs for purposes of caching between DNS + Firewall and the upstream servers. Lower TTLs will be increased to the minimum + defined here for caching purposes. + """ negative_cache_ttl: Optional[float] - """Negative DNS Cache TTL.""" + """Negative DNS cache TTL. + + This setting controls how long DNS Firewall should cache negative responses + (e.g., NXDOMAIN) from the upstream servers. + """ ratelimit: Optional[float] """ diff --git a/src/cloudflare/types/dns/firewall_edit_params.py b/src/cloudflare/types/dns/firewall_edit_params.py index 349e2a2b177..3e87a30ef50 100644 --- a/src/cloudflare/types/dns/firewall_edit_params.py +++ b/src/cloudflare/types/dns/firewall_edit_params.py @@ -28,10 +28,20 @@ class FirewallEditParams(TypedDict, total=False): """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.""" maximum_cache_ttl: Required[float] - """Maximum DNS Cache TTL.""" + """Maximum DNS cache TTL. + + This setting sets an upper bound on DNS TTLs for purposes of caching between DNS + Firewall and the upstream servers. Higher TTLs will be decreased to the maximum + defined here for caching purposes. + """ minimum_cache_ttl: Required[float] - """Minimum DNS Cache TTL.""" + """Minimum DNS cache TTL. + + This setting sets a lower bound on DNS TTLs for purposes of caching between DNS + Firewall and the upstream servers. Lower TTLs will be increased to the minimum + defined here for caching purposes. + """ name: Required[str] """DNS Firewall Cluster Name.""" @@ -42,7 +52,11 @@ class FirewallEditParams(TypedDict, total=False): """Attack mitigation settings.""" negative_cache_ttl: Optional[float] - """Negative DNS Cache TTL.""" + """Negative DNS cache TTL. + + This setting controls how long DNS Firewall should cache negative responses + (e.g., NXDOMAIN) from the upstream servers. + """ ratelimit: Optional[float] """ From ca2bde239b915b466b12771884e89b280dd3065a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 09:01:29 +0000 Subject: [PATCH 297/316] 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 59fa19c430a..10fd2e7e73a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-129ae207bac48d5f0a569cefeb5ff52209e7ef746666eb4e8f72aeb08a7748aa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-74d68374448e03b29a39bb6cdf6c39cdeaaaa691dd9c38f46a26a1d562c8ee37.yml From 28c06a7fd33c143e5da9b368b70262677d8c5fb4 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Tue, 16 Jul 2024 10:46:57 +0100 Subject: [PATCH 298/316] feat(api): add hash to url_scanner --- src/cloudflare/resources/url_scanner/url_scanner.py | 8 ++++++++ .../types/url_scanner/url_scanner_scan_params.py | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/cloudflare/resources/url_scanner/url_scanner.py b/src/cloudflare/resources/url_scanner/url_scanner.py index de67cb75970..4c7bf2e1059 100644 --- a/src/cloudflare/resources/url_scanner/url_scanner.py +++ b/src/cloudflare/resources/url_scanner/url_scanner.py @@ -57,6 +57,7 @@ def scan( asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + hash: str | NotGiven = NOT_GIVEN, hostname: str | NotGiven = NOT_GIVEN, ip: str | NotGiven = NOT_GIVEN, is_malicious: bool | NotGiven = NOT_GIVEN, @@ -97,6 +98,8 @@ def scan( date_start: Filter scans requested after date (inclusive). + hash: Filter scans by hash of any html/js/css request made by the webpage. + hostname: Filter scans by hostname of _any_ request made by the webpage. ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage. @@ -146,6 +149,7 @@ def scan( "asn": asn, "date_end": date_end, "date_start": date_start, + "hash": hash, "hostname": hostname, "ip": ip, "is_malicious": is_malicious, @@ -189,6 +193,7 @@ async def scan( asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + hash: str | NotGiven = NOT_GIVEN, hostname: str | NotGiven = NOT_GIVEN, ip: str | NotGiven = NOT_GIVEN, is_malicious: bool | NotGiven = NOT_GIVEN, @@ -229,6 +234,8 @@ async def scan( date_start: Filter scans requested after date (inclusive). + hash: Filter scans by hash of any html/js/css request made by the webpage. + hostname: Filter scans by hostname of _any_ request made by the webpage. ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage. @@ -278,6 +285,7 @@ async def scan( "asn": asn, "date_end": date_end, "date_start": date_start, + "hash": hash, "hostname": hostname, "ip": ip, "is_malicious": is_malicious, diff --git a/src/cloudflare/types/url_scanner/url_scanner_scan_params.py b/src/cloudflare/types/url_scanner/url_scanner_scan_params.py index 76879316d3e..faa55bf906b 100644 --- a/src/cloudflare/types/url_scanner/url_scanner_scan_params.py +++ b/src/cloudflare/types/url_scanner/url_scanner_scan_params.py @@ -27,6 +27,9 @@ class URLScannerScanParams(TypedDict, total=False): date_start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter scans requested after date (inclusive).""" + hash: str + """Filter scans by hash of any html/js/css request made by the webpage.""" + hostname: str """Filter scans by hostname of _any_ request made by the webpage.""" From d3e0648ee12e9cf442de7c58e29cc5bfe5ec8abe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:07:11 +0000 Subject: [PATCH 299/316] feat(api): OpenAPI spec update via Stainless API (#1191) --- .stats.yml | 2 +- api.md | 22 +- .../resources/api_gateway/configurations.py | 60 ++--- .../api_gateway/discovery/operations.py | 22 +- .../api_gateway/operations/operations.py | 101 ++++---- .../operations/schema_validation.py | 8 + .../api_gateway/user_schemas/operations.py | 18 +- .../api_gateway/user_schemas/user_schemas.py | 32 +-- src/cloudflare/types/api_gateway/__init__.py | 2 + .../types/api_gateway/api_shield.py | 4 +- .../types/api_gateway/configuration.py | 4 +- .../configuration_update_params.py | 2 +- .../configuration_update_response.py | 14 +- .../discovery/operation_list_params.py | 4 +- .../api_gateway/discovery_get_response.py | 6 +- .../types/api_gateway/discovery_operation.py | 2 +- .../api_gateway/operation_delete_response.py | 14 +- .../api_gateway/operation_get_response.py | 227 ++++++++++++++++++ .../api_gateway/operation_list_params.py | 6 +- .../api_gateway/operation_list_response.py | 227 ++++++++++++++++++ .../types/api_gateway/public_schema.py | 2 +- .../user_schema_delete_response.py | 4 +- .../api_gateway/user_schema_list_params.py | 4 +- .../user_schemas/operation_list_params.py | 4 +- .../api_gateway/discovery/test_operations.py | 46 ++-- .../api_gateway/test_configurations.py | 50 ++-- .../api_gateway/test_operations.py | 55 ++--- .../api_gateway/test_user_schemas.py | 40 +-- .../user_schemas/test_operations.py | 26 +- 29 files changed, 747 insertions(+), 261 deletions(-) create mode 100644 src/cloudflare/types/api_gateway/operation_get_response.py create mode 100644 src/cloudflare/types/api_gateway/operation_list_response.py diff --git a/.stats.yml b/.stats.yml index 10fd2e7e73a..a7c4ebd6ec6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-74d68374448e03b29a39bb6cdf6c39cdeaaaa691dd9c38f46a26a1d562c8ee37.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b116e60da4a69a05bc8823c2397e4a33d111c82a6b458ea4f480d0ba52ea8de0.yml diff --git a/api.md b/api.md index 9418685f613..b2c35ac9ccd 100644 --- a/api.md +++ b/api.md @@ -2392,7 +2392,7 @@ from cloudflare.types.api_gateway.discovery import OperationEditResponse Methods: -- client.api_gateway.discovery.operations.list(\*, zone_id, \*\*params) -> SyncSinglePage[DiscoveryOperation] +- client.api_gateway.discovery.operations.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[DiscoveryOperation] - client.api_gateway.discovery.operations.edit(operation_id, \*, zone_id, \*\*params) -> OperationEditResponse ## Operations @@ -2400,15 +2400,21 @@ Methods: Types: ```python -from cloudflare.types.api_gateway import APIShield, OperationCreateResponse, OperationDeleteResponse +from cloudflare.types.api_gateway import ( + APIShield, + OperationCreateResponse, + OperationListResponse, + OperationDeleteResponse, + OperationGetResponse, +) ``` Methods: -- client.api_gateway.operations.create(\*, zone_id, \*\*params) -> Optional -- client.api_gateway.operations.list(\*, zone_id, \*\*params) -> SyncSinglePage[APIShield] +- client.api_gateway.operations.create(\*, zone_id, \*\*params) -> OperationCreateResponse +- client.api_gateway.operations.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[OperationListResponse] - client.api_gateway.operations.delete(operation_id, \*, zone_id) -> OperationDeleteResponse -- client.api_gateway.operations.get(operation_id, \*, zone_id, \*\*params) -> APIShield +- client.api_gateway.operations.get(operation_id, \*, zone_id, \*\*params) -> OperationGetResponse ### SchemaValidation @@ -2472,8 +2478,8 @@ from cloudflare.types.api_gateway import ( Methods: - client.api_gateway.user_schemas.create(\*, zone_id, \*\*params) -> SchemaUpload -- client.api_gateway.user_schemas.list(\*, zone_id, \*\*params) -> SyncSinglePage[PublicSchema] -- client.api_gateway.user_schemas.delete(schema_id, \*, zone_id) -> UserSchemaDeleteResponse +- client.api_gateway.user_schemas.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[PublicSchema] +- client.api_gateway.user_schemas.delete(schema_id, \*, zone_id) -> Optional - client.api_gateway.user_schemas.edit(schema_id, \*, zone_id, \*\*params) -> PublicSchema - client.api_gateway.user_schemas.get(schema_id, \*, zone_id, \*\*params) -> PublicSchema @@ -2487,7 +2493,7 @@ from cloudflare.types.api_gateway.user_schemas import OperationListResponse Methods: -- client.api_gateway.user_schemas.operations.list(schema_id, \*, zone_id, \*\*params) -> SyncSinglePage[OperationListResponse] +- client.api_gateway.user_schemas.operations.list(schema_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[OperationListResponse] # ManagedHeaders diff --git a/src/cloudflare/resources/api_gateway/configurations.py b/src/cloudflare/resources/api_gateway/configurations.py index 3d4aa7ba68a..efa78c99742 100644 --- a/src/cloudflare/resources/api_gateway/configurations.py +++ b/src/cloudflare/resources/api_gateway/configurations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, Iterable, cast +from typing import List, Type, Iterable, cast from typing_extensions import Literal import httpx @@ -42,7 +42,7 @@ def update( self, *, zone_id: str, - auth_id_characteristics: Iterable[configuration_update_params.AuthIDCharacteristic] | NotGiven = NOT_GIVEN, + auth_id_characteristics: Iterable[configuration_update_params.AuthIDCharacteristic], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -66,25 +66,16 @@ def update( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - ConfigurationUpdateResponse, - self._put( - f"/zones/{zone_id}/api_gateway/configuration", - body=maybe_transform( - {"auth_id_characteristics": auth_id_characteristics}, - configuration_update_params.ConfigurationUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ConfigurationUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ConfigurationUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._put( + f"/zones/{zone_id}/api_gateway/configuration", + body=maybe_transform( + {"auth_id_characteristics": auth_id_characteristics}, + configuration_update_params.ConfigurationUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=ConfigurationUpdateResponse, ) def get( @@ -144,7 +135,7 @@ async def update( self, *, zone_id: str, - auth_id_characteristics: Iterable[configuration_update_params.AuthIDCharacteristic] | NotGiven = NOT_GIVEN, + auth_id_characteristics: Iterable[configuration_update_params.AuthIDCharacteristic], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -168,25 +159,16 @@ async def update( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - ConfigurationUpdateResponse, - await self._put( - f"/zones/{zone_id}/api_gateway/configuration", - body=await async_maybe_transform( - {"auth_id_characteristics": auth_id_characteristics}, - configuration_update_params.ConfigurationUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ConfigurationUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ConfigurationUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._put( + f"/zones/{zone_id}/api_gateway/configuration", + body=await async_maybe_transform( + {"auth_id_characteristics": auth_id_characteristics}, + configuration_update_params.ConfigurationUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=ConfigurationUpdateResponse, ) async def get( diff --git a/src/cloudflare/resources/api_gateway/discovery/operations.py b/src/cloudflare/resources/api_gateway/discovery/operations.py index 03fb113abb0..4f7fb29a475 100644 --- a/src/cloudflare/resources/api_gateway/discovery/operations.py +++ b/src/cloudflare/resources/api_gateway/discovery/operations.py @@ -21,7 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....pagination import SyncSinglePage, AsyncSinglePage +from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import AsyncPaginator, make_request_options from ....types.api_gateway.discovery import operation_edit_params, operation_list_params from ....types.api_gateway.discovery_operation import DiscoveryOperation @@ -51,8 +51,8 @@ def list( order: Literal["host", "method", "endpoint", "traffic_stats.requests", "traffic_stats.last_updated"] | NotGiven = NOT_GIVEN, origin: Literal["ML", "SessionIdentifier"] | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: object | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | NotGiven = NOT_GIVEN, state: Literal["review", "saved", "ignored"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -60,7 +60,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncSinglePage[DiscoveryOperation]: + ) -> SyncV4PagePaginationArray[DiscoveryOperation]: """ Retrieve the most up to date view of discovered operations @@ -112,7 +112,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/discovery/operations", - page=SyncSinglePage[DiscoveryOperation], + page=SyncV4PagePaginationArray[DiscoveryOperation], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -156,7 +156,7 @@ def edit( Args: zone_id: Identifier - operation_id: UUID identifier + operation_id: UUID state: Mark state of operation in API Discovery @@ -210,8 +210,8 @@ def list( order: Literal["host", "method", "endpoint", "traffic_stats.requests", "traffic_stats.last_updated"] | NotGiven = NOT_GIVEN, origin: Literal["ML", "SessionIdentifier"] | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: object | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | NotGiven = NOT_GIVEN, state: Literal["review", "saved", "ignored"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -219,7 +219,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[DiscoveryOperation, AsyncSinglePage[DiscoveryOperation]]: + ) -> AsyncPaginator[DiscoveryOperation, AsyncV4PagePaginationArray[DiscoveryOperation]]: """ Retrieve the most up to date view of discovered operations @@ -271,7 +271,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/discovery/operations", - page=AsyncSinglePage[DiscoveryOperation], + page=AsyncV4PagePaginationArray[DiscoveryOperation], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -315,7 +315,7 @@ async def edit( Args: zone_id: Identifier - operation_id: UUID identifier + operation_id: UUID state: Mark state of operation in API Discovery diff --git a/src/cloudflare/resources/api_gateway/operations/operations.py b/src/cloudflare/resources/api_gateway/operations/operations.py index f0737a85bf5..cb5b7673217 100644 --- a/src/cloudflare/resources/api_gateway/operations/operations.py +++ b/src/cloudflare/resources/api_gateway/operations/operations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, Iterable, Optional, cast +from typing import List, Type, Iterable, cast from typing_extensions import Literal import httpx @@ -21,7 +21,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....pagination import SyncSinglePage, AsyncSinglePage +from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import AsyncPaginator, make_request_options from .schema_validation import ( SchemaValidationResource, @@ -32,7 +32,8 @@ AsyncSchemaValidationResourceWithStreamingResponse, ) from ....types.api_gateway import operation_get_params, operation_list_params, operation_create_params -from ....types.api_gateway.api_shield import APIShield +from ....types.api_gateway.operation_get_response import OperationGetResponse +from ....types.api_gateway.operation_list_response import OperationListResponse from ....types.api_gateway.operation_create_response import OperationCreateResponse from ....types.api_gateway.operation_delete_response import OperationDeleteResponse @@ -63,7 +64,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OperationCreateResponse]: + ) -> OperationCreateResponse: """Add one or more operations to a zone. Endpoints can contain path variables. @@ -93,9 +94,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[OperationCreateResponse]]._unwrapper, + post_parser=ResultWrapper[OperationCreateResponse]._unwrapper, ), - cast_to=cast(Type[Optional[OperationCreateResponse]], ResultWrapper[OperationCreateResponse]), + cast_to=cast(Type[OperationCreateResponse], ResultWrapper[OperationCreateResponse]), ) def list( @@ -108,15 +109,15 @@ def list( host: List[str] | NotGiven = NOT_GIVEN, method: List[str] | NotGiven = NOT_GIVEN, order: Literal["method", "host", "endpoint", "thresholds.$key"] | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: float | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: 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, - ) -> SyncSinglePage[APIShield]: + ) -> SyncV4PagePaginationArray[OperationListResponse]: """ Retrieve information about all operations on a zone @@ -140,7 +141,7 @@ def list( page: Page number of paginated results. - per_page: Number of results to return per page + per_page: Maximum number of results per page. extra_headers: Send extra headers @@ -154,7 +155,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/operations", - page=SyncSinglePage[APIShield], + page=SyncV4PagePaginationArray[OperationListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -174,7 +175,7 @@ def list( operation_list_params.OperationListParams, ), ), - model=APIShield, + model=OperationListResponse, ) def delete( @@ -195,6 +196,8 @@ def delete( Args: zone_id: Identifier + operation_id: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -207,21 +210,12 @@ def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not operation_id: raise ValueError(f"Expected a non-empty value for `operation_id` but received {operation_id!r}") - return cast( - OperationDeleteResponse, - self._delete( - f"/zones/{zone_id}/api_gateway/operations/{operation_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[OperationDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[OperationDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/zones/{zone_id}/api_gateway/operations/{operation_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=OperationDeleteResponse, ) def get( @@ -236,13 +230,15 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> APIShield: + ) -> OperationGetResponse: """ Retrieve information about an operation Args: zone_id: Identifier + operation_id: UUID + feature: Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. @@ -267,9 +263,9 @@ def get( extra_body=extra_body, timeout=timeout, query=maybe_transform({"feature": feature}, operation_get_params.OperationGetParams), - post_parser=ResultWrapper[APIShield]._unwrapper, + post_parser=ResultWrapper[OperationGetResponse]._unwrapper, ), - cast_to=cast(Type[APIShield], ResultWrapper[APIShield]), + cast_to=cast(Type[OperationGetResponse], ResultWrapper[OperationGetResponse]), ) @@ -297,7 +293,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OperationCreateResponse]: + ) -> OperationCreateResponse: """Add one or more operations to a zone. Endpoints can contain path variables. @@ -327,9 +323,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[OperationCreateResponse]]._unwrapper, + post_parser=ResultWrapper[OperationCreateResponse]._unwrapper, ), - cast_to=cast(Type[Optional[OperationCreateResponse]], ResultWrapper[OperationCreateResponse]), + cast_to=cast(Type[OperationCreateResponse], ResultWrapper[OperationCreateResponse]), ) def list( @@ -342,15 +338,15 @@ def list( host: List[str] | NotGiven = NOT_GIVEN, method: List[str] | NotGiven = NOT_GIVEN, order: Literal["method", "host", "endpoint", "thresholds.$key"] | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: float | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: 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, - ) -> AsyncPaginator[APIShield, AsyncSinglePage[APIShield]]: + ) -> AsyncPaginator[OperationListResponse, AsyncV4PagePaginationArray[OperationListResponse]]: """ Retrieve information about all operations on a zone @@ -374,7 +370,7 @@ def list( page: Page number of paginated results. - per_page: Number of results to return per page + per_page: Maximum number of results per page. extra_headers: Send extra headers @@ -388,7 +384,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/operations", - page=AsyncSinglePage[APIShield], + page=AsyncV4PagePaginationArray[OperationListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -408,7 +404,7 @@ def list( operation_list_params.OperationListParams, ), ), - model=APIShield, + model=OperationListResponse, ) async def delete( @@ -429,6 +425,8 @@ async def delete( Args: zone_id: Identifier + operation_id: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -441,21 +439,12 @@ async def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not operation_id: raise ValueError(f"Expected a non-empty value for `operation_id` but received {operation_id!r}") - return cast( - OperationDeleteResponse, - await self._delete( - f"/zones/{zone_id}/api_gateway/operations/{operation_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[OperationDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[OperationDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/zones/{zone_id}/api_gateway/operations/{operation_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=OperationDeleteResponse, ) async def get( @@ -470,13 +459,15 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> APIShield: + ) -> OperationGetResponse: """ Retrieve information about an operation Args: zone_id: Identifier + operation_id: UUID + feature: Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. @@ -501,9 +492,9 @@ async def get( extra_body=extra_body, timeout=timeout, query=await async_maybe_transform({"feature": feature}, operation_get_params.OperationGetParams), - post_parser=ResultWrapper[APIShield]._unwrapper, + post_parser=ResultWrapper[OperationGetResponse]._unwrapper, ), - cast_to=cast(Type[APIShield], ResultWrapper[APIShield]), + cast_to=cast(Type[OperationGetResponse], ResultWrapper[OperationGetResponse]), ) diff --git a/src/cloudflare/resources/api_gateway/operations/schema_validation.py b/src/cloudflare/resources/api_gateway/operations/schema_validation.py index 5b86343cfd6..75fbceb4e40 100644 --- a/src/cloudflare/resources/api_gateway/operations/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/operations/schema_validation.py @@ -63,6 +63,8 @@ def update( Args: zone_id: Identifier + operation_id: UUID + mitigation_action: When set, this applies a mitigation action to this operation - `log` log request when request does not conform to schema for this operation @@ -154,6 +156,8 @@ def get( Args: zone_id: Identifier + operation_id: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -203,6 +207,8 @@ async def update( Args: zone_id: Identifier + operation_id: UUID + mitigation_action: When set, this applies a mitigation action to this operation - `log` log request when request does not conform to schema for this operation @@ -296,6 +302,8 @@ async def get( Args: zone_id: Identifier + operation_id: UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/cloudflare/resources/api_gateway/user_schemas/operations.py b/src/cloudflare/resources/api_gateway/user_schemas/operations.py index 783e7f5e5cd..18cb925ea95 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/operations.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/operations.py @@ -17,7 +17,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ....pagination import SyncSinglePage, AsyncSinglePage +from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import AsyncPaginator, make_request_options from ....types.api_gateway.user_schemas import operation_list_params from ....types.api_gateway.user_schemas.operation_list_response import OperationListResponse @@ -44,15 +44,15 @@ def list( host: List[str] | NotGiven = NOT_GIVEN, method: List[str] | NotGiven = NOT_GIVEN, operation_status: Literal["new", "existing"] | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: object | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: 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, - ) -> SyncSinglePage[OperationListResponse]: + ) -> SyncV4PagePaginationArray[OperationListResponse]: """Retrieves all operations from the schema. Operations that already exist in API @@ -94,7 +94,7 @@ def list( raise ValueError(f"Expected a non-empty value for `schema_id` but received {schema_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations", - page=SyncSinglePage[OperationListResponse], + page=SyncV4PagePaginationArray[OperationListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -136,15 +136,15 @@ def list( host: List[str] | NotGiven = NOT_GIVEN, method: List[str] | NotGiven = NOT_GIVEN, operation_status: Literal["new", "existing"] | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: object | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: 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, - ) -> AsyncPaginator[OperationListResponse, AsyncSinglePage[OperationListResponse]]: + ) -> AsyncPaginator[OperationListResponse, AsyncV4PagePaginationArray[OperationListResponse]]: """Retrieves all operations from the schema. Operations that already exist in API @@ -186,7 +186,7 @@ def list( raise ValueError(f"Expected a non-empty value for `schema_id` but received {schema_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations", - page=AsyncSinglePage[OperationListResponse], + page=AsyncV4PagePaginationArray[OperationListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py index a2f21d53add..267ebee4be3 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Mapping, cast +from typing import Any, Type, Mapping, Optional, cast from typing_extensions import Literal import httpx @@ -31,7 +31,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....pagination import SyncSinglePage, AsyncSinglePage +from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import AsyncPaginator, make_request_options from ....types.api_gateway import ( user_schema_get_params, @@ -130,8 +130,8 @@ def list( *, zone_id: str, omit_source: bool | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: object | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | NotGiven = NOT_GIVEN, validation_enabled: 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. @@ -139,7 +139,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncSinglePage[PublicSchema]: + ) -> SyncV4PagePaginationArray[PublicSchema]: """ Retrieve information about all schemas on a zone @@ -166,7 +166,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/user_schemas", - page=SyncSinglePage[PublicSchema], + page=SyncV4PagePaginationArray[PublicSchema], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -196,7 +196,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UserSchemaDeleteResponse: + ) -> Optional[UserSchemaDeleteResponse]: """ Delete a schema @@ -216,7 +216,7 @@ def delete( if not schema_id: raise ValueError(f"Expected a non-empty value for `schema_id` but received {schema_id!r}") return cast( - UserSchemaDeleteResponse, + Optional[UserSchemaDeleteResponse], self._delete( f"/zones/{zone_id}/api_gateway/user_schemas/{schema_id}", options=make_request_options( @@ -224,7 +224,7 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[UserSchemaDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[UserSchemaDeleteResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[UserSchemaDeleteResponse] @@ -411,8 +411,8 @@ def list( *, zone_id: str, omit_source: bool | NotGiven = NOT_GIVEN, - page: object | NotGiven = NOT_GIVEN, - per_page: object | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | NotGiven = NOT_GIVEN, validation_enabled: 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. @@ -420,7 +420,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[PublicSchema, AsyncSinglePage[PublicSchema]]: + ) -> AsyncPaginator[PublicSchema, AsyncV4PagePaginationArray[PublicSchema]]: """ Retrieve information about all schemas on a zone @@ -447,7 +447,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/api_gateway/user_schemas", - page=AsyncSinglePage[PublicSchema], + page=AsyncV4PagePaginationArray[PublicSchema], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -477,7 +477,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UserSchemaDeleteResponse: + ) -> Optional[UserSchemaDeleteResponse]: """ Delete a schema @@ -497,7 +497,7 @@ async def delete( if not schema_id: raise ValueError(f"Expected a non-empty value for `schema_id` but received {schema_id!r}") return cast( - UserSchemaDeleteResponse, + Optional[UserSchemaDeleteResponse], await self._delete( f"/zones/{zone_id}/api_gateway/user_schemas/{schema_id}", options=make_request_options( @@ -505,7 +505,7 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[UserSchemaDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[UserSchemaDeleteResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[UserSchemaDeleteResponse] diff --git a/src/cloudflare/types/api_gateway/__init__.py b/src/cloudflare/types/api_gateway/__init__.py index 03e7d8be4f3..15d29b9c6f3 100644 --- a/src/cloudflare/types/api_gateway/__init__.py +++ b/src/cloudflare/types/api_gateway/__init__.py @@ -14,8 +14,10 @@ from .schema_list_response import SchemaListResponse as SchemaListResponse from .operation_list_params import OperationListParams as OperationListParams from .discovery_get_response import DiscoveryGetResponse as DiscoveryGetResponse +from .operation_get_response import OperationGetResponse as OperationGetResponse from .user_schema_get_params import UserSchemaGetParams as UserSchemaGetParams from .operation_create_params import OperationCreateParams as OperationCreateParams +from .operation_list_response import OperationListResponse as OperationListResponse from .user_schema_edit_params import UserSchemaEditParams as UserSchemaEditParams from .user_schema_list_params import UserSchemaListParams as UserSchemaListParams from .configuration_get_params import ConfigurationGetParams as ConfigurationGetParams diff --git a/src/cloudflare/types/api_gateway/api_shield.py b/src/cloudflare/types/api_gateway/api_shield.py index 9f5c25885e8..e3ca4b81018 100644 --- a/src/cloudflare/types/api_gateway/api_shield.py +++ b/src/cloudflare/types/api_gateway/api_shield.py @@ -169,7 +169,7 @@ class FeaturesAPIShieldOperationFeatureConfidenceIntervals(BaseModel): class FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema(BaseModel): id: Optional[str] = None - """UUID identifier""" + """UUID""" created_at: Optional[datetime] = None @@ -222,6 +222,6 @@ class APIShield(BaseModel): """The HTTP method used to access the endpoint.""" operation_id: str - """UUID identifier""" + """UUID""" features: Optional[Features] = None diff --git a/src/cloudflare/types/api_gateway/configuration.py b/src/cloudflare/types/api_gateway/configuration.py index 855946241b2..b9dbfd61c92 100644 --- a/src/cloudflare/types/api_gateway/configuration.py +++ b/src/cloudflare/types/api_gateway/configuration.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import List, Union from typing_extensions import Literal from ..._models import BaseModel @@ -43,4 +43,4 @@ class AuthIDCharacteristicAPIShieldAuthIDCharacteristicJwtClaim(BaseModel): class Configuration(BaseModel): - auth_id_characteristics: Optional[List[AuthIDCharacteristic]] = None + auth_id_characteristics: List[AuthIDCharacteristic] diff --git a/src/cloudflare/types/api_gateway/configuration_update_params.py b/src/cloudflare/types/api_gateway/configuration_update_params.py index 52c7aff9ed0..db98617b582 100644 --- a/src/cloudflare/types/api_gateway/configuration_update_params.py +++ b/src/cloudflare/types/api_gateway/configuration_update_params.py @@ -17,7 +17,7 @@ class ConfigurationUpdateParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - auth_id_characteristics: Iterable[AuthIDCharacteristic] + auth_id_characteristics: Required[Iterable[AuthIDCharacteristic]] class AuthIDCharacteristicAPIShieldAuthIDCharacteristic(TypedDict, total=False): diff --git a/src/cloudflare/types/api_gateway/configuration_update_response.py b/src/cloudflare/types/api_gateway/configuration_update_response.py index efe6f827dda..ae84bf09c04 100644 --- a/src/cloudflare/types/api_gateway/configuration_update_response.py +++ b/src/cloudflare/types/api_gateway/configuration_update_response.py @@ -1,7 +1,17 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional +from typing_extensions import Literal + +from .message import Message +from ..._models import BaseModel __all__ = ["ConfigurationUpdateResponse"] -ConfigurationUpdateResponse = Union[Optional[str], Optional[object]] + +class ConfigurationUpdateResponse(BaseModel): + errors: Message + + messages: Message + + success: Literal[True] + """Whether the API call was successful""" diff --git a/src/cloudflare/types/api_gateway/discovery/operation_list_params.py b/src/cloudflare/types/api_gateway/discovery/operation_list_params.py index 978fee2d4bb..0b33645439c 100644 --- a/src/cloudflare/types/api_gateway/discovery/operation_list_params.py +++ b/src/cloudflare/types/api_gateway/discovery/operation_list_params.py @@ -43,10 +43,10 @@ class OperationListParams(TypedDict, total=False): Identifier API Discovery """ - page: object + page: int """Page number of paginated results.""" - per_page: object + per_page: int """Maximum number of results per page.""" state: Literal["review", "saved", "ignored"] diff --git a/src/cloudflare/types/api_gateway/discovery_get_response.py b/src/cloudflare/types/api_gateway/discovery_get_response.py index ac55c572760..bcc99ffc364 100644 --- a/src/cloudflare/types/api_gateway/discovery_get_response.py +++ b/src/cloudflare/types/api_gateway/discovery_get_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from ..._models import BaseModel @@ -9,6 +9,6 @@ class DiscoveryGetResponse(BaseModel): - schemas: Optional[List[object]] = None + schemas: List[object] - timestamp: Optional[datetime] = None + timestamp: datetime diff --git a/src/cloudflare/types/api_gateway/discovery_operation.py b/src/cloudflare/types/api_gateway/discovery_operation.py index bf9570a9176..8c3fe0a8617 100644 --- a/src/cloudflare/types/api_gateway/discovery_operation.py +++ b/src/cloudflare/types/api_gateway/discovery_operation.py @@ -25,7 +25,7 @@ class Features(BaseModel): class DiscoveryOperation(BaseModel): id: str - """UUID identifier""" + """UUID""" endpoint: str """ diff --git a/src/cloudflare/types/api_gateway/operation_delete_response.py b/src/cloudflare/types/api_gateway/operation_delete_response.py index 5c1266decb6..3122a809ae2 100644 --- a/src/cloudflare/types/api_gateway/operation_delete_response.py +++ b/src/cloudflare/types/api_gateway/operation_delete_response.py @@ -1,7 +1,17 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional +from typing_extensions import Literal + +from .message import Message +from ..._models import BaseModel __all__ = ["OperationDeleteResponse"] -OperationDeleteResponse = Union[Optional[str], Optional[object]] + +class OperationDeleteResponse(BaseModel): + errors: Message + + messages: Message + + success: Literal[True] + """Whether the API call was successful""" diff --git a/src/cloudflare/types/api_gateway/operation_get_response.py b/src/cloudflare/types/api_gateway/operation_get_response.py new file mode 100644 index 00000000000..70a9d927019 --- /dev/null +++ b/src/cloudflare/types/api_gateway/operation_get_response.py @@ -0,0 +1,227 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = [ + "OperationGetResponse", + "Features", + "FeaturesAPIShieldOperationFeatureThresholds", + "FeaturesAPIShieldOperationFeatureThresholdsThresholds", + "FeaturesAPIShieldOperationFeatureParameterSchemas", + "FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", + "FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", + "FeaturesAPIShieldOperationFeatureAPIRouting", + "FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting", + "FeaturesAPIShieldOperationFeatureConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99", + "FeaturesAPIShieldOperationFeatureSchemaInfo", + "FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", + "FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema", +] + + +class FeaturesAPIShieldOperationFeatureThresholdsThresholds(BaseModel): + auth_id_tokens: Optional[int] = None + """The total number of auth-ids seen across this calculation.""" + + data_points: Optional[int] = None + """The number of data points used for the threshold suggestion calculation.""" + + last_updated: Optional[datetime] = None + + p50: Optional[int] = None + """The p50 quantile of requests (in period_seconds).""" + + p90: Optional[int] = None + """The p90 quantile of requests (in period_seconds).""" + + p99: Optional[int] = None + """The p99 quantile of requests (in period_seconds).""" + + period_seconds: Optional[int] = None + """The period over which this threshold is suggested.""" + + requests: Optional[int] = None + """The estimated number of requests covered by these calculations.""" + + suggested_threshold: Optional[int] = None + """The suggested threshold in requests done by the same auth_id or period_seconds.""" + + +class FeaturesAPIShieldOperationFeatureThresholds(BaseModel): + thresholds: Optional[FeaturesAPIShieldOperationFeatureThresholdsThresholds] = None + + +class FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas(BaseModel): + parameters: Optional[List[object]] = None + """An array containing the learned parameter schemas.""" + + responses: Optional[object] = None + """An empty response object. + + This field is required to yield a valid operation schema. + """ + + +class FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas(BaseModel): + last_updated: Optional[datetime] = None + + parameter_schemas: Optional[ + FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas + ] = None + """An operation schema object containing a response.""" + + +class FeaturesAPIShieldOperationFeatureParameterSchemas(BaseModel): + parameter_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas + + +class FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting(BaseModel): + last_updated: Optional[datetime] = None + + route: Optional[str] = None + """Target route.""" + + +class FeaturesAPIShieldOperationFeatureAPIRouting(BaseModel): + api_routing: Optional[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] = None + """API Routing settings on endpoint.""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals( + BaseModel +): + p90: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 + ] = None + """Upper and lower bound for percentile estimate""" + + p95: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 + ] = None + """Upper and lower bound for percentile estimate""" + + p99: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 + ] = None + """Upper and lower bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold(BaseModel): + confidence_intervals: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals + ] = None + + mean: Optional[float] = None + """Suggested threshold.""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals(BaseModel): + last_updated: Optional[datetime] = None + + suggested_threshold: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold + ] = None + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervals(BaseModel): + confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] = None + + +class FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema(BaseModel): + id: Optional[str] = None + """UUID""" + + created_at: Optional[datetime] = None + + is_learned: Optional[bool] = None + """True if schema is Cloudflare-provided.""" + + name: Optional[str] = None + """Schema file name.""" + + +class FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo(BaseModel): + active_schema: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] = None + """Schema active on endpoint.""" + + learned_available: Optional[bool] = None + """True if a Cloudflare-provided learned schema is available for this endpoint.""" + + mitigation_action: Optional[Literal["none", "log", "block"]] = None + """Action taken on requests failing validation.""" + + +class FeaturesAPIShieldOperationFeatureSchemaInfo(BaseModel): + schema_info: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] = None + + +Features = Union[ + FeaturesAPIShieldOperationFeatureThresholds, + FeaturesAPIShieldOperationFeatureParameterSchemas, + FeaturesAPIShieldOperationFeatureAPIRouting, + FeaturesAPIShieldOperationFeatureConfidenceIntervals, + FeaturesAPIShieldOperationFeatureSchemaInfo, +] + + +class OperationGetResponse(BaseModel): + endpoint: str + """ + The endpoint which can contain path parameter templates in curly braces, each + will be replaced from left to right with {varN}, starting with {var1}, during + insertion. This will further be Cloudflare-normalized upon insertion. See: + https://developers.cloudflare.com/rules/normalization/how-it-works/. + """ + + host: str + """RFC3986-compliant host.""" + + last_updated: datetime + + method: Literal["GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE"] + """The HTTP method used to access the endpoint.""" + + operation_id: str + """UUID""" + + features: Optional[Features] = None diff --git a/src/cloudflare/types/api_gateway/operation_list_params.py b/src/cloudflare/types/api_gateway/operation_list_params.py index d36dac5d172..1244f5a078f 100644 --- a/src/cloudflare/types/api_gateway/operation_list_params.py +++ b/src/cloudflare/types/api_gateway/operation_list_params.py @@ -39,8 +39,8 @@ class OperationListParams(TypedDict, total=False): e.g., `thresholds.suggested_threshold`. """ - page: object + page: int """Page number of paginated results.""" - per_page: float - """Number of results to return per page""" + per_page: int + """Maximum number of results per page.""" diff --git a/src/cloudflare/types/api_gateway/operation_list_response.py b/src/cloudflare/types/api_gateway/operation_list_response.py new file mode 100644 index 00000000000..53c500cb16f --- /dev/null +++ b/src/cloudflare/types/api_gateway/operation_list_response.py @@ -0,0 +1,227 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = [ + "OperationListResponse", + "Features", + "FeaturesAPIShieldOperationFeatureThresholds", + "FeaturesAPIShieldOperationFeatureThresholdsThresholds", + "FeaturesAPIShieldOperationFeatureParameterSchemas", + "FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", + "FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", + "FeaturesAPIShieldOperationFeatureAPIRouting", + "FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting", + "FeaturesAPIShieldOperationFeatureConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95", + "FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99", + "FeaturesAPIShieldOperationFeatureSchemaInfo", + "FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", + "FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema", +] + + +class FeaturesAPIShieldOperationFeatureThresholdsThresholds(BaseModel): + auth_id_tokens: Optional[int] = None + """The total number of auth-ids seen across this calculation.""" + + data_points: Optional[int] = None + """The number of data points used for the threshold suggestion calculation.""" + + last_updated: Optional[datetime] = None + + p50: Optional[int] = None + """The p50 quantile of requests (in period_seconds).""" + + p90: Optional[int] = None + """The p90 quantile of requests (in period_seconds).""" + + p99: Optional[int] = None + """The p99 quantile of requests (in period_seconds).""" + + period_seconds: Optional[int] = None + """The period over which this threshold is suggested.""" + + requests: Optional[int] = None + """The estimated number of requests covered by these calculations.""" + + suggested_threshold: Optional[int] = None + """The suggested threshold in requests done by the same auth_id or period_seconds.""" + + +class FeaturesAPIShieldOperationFeatureThresholds(BaseModel): + thresholds: Optional[FeaturesAPIShieldOperationFeatureThresholdsThresholds] = None + + +class FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas(BaseModel): + parameters: Optional[List[object]] = None + """An array containing the learned parameter schemas.""" + + responses: Optional[object] = None + """An empty response object. + + This field is required to yield a valid operation schema. + """ + + +class FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas(BaseModel): + last_updated: Optional[datetime] = None + + parameter_schemas: Optional[ + FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas + ] = None + """An operation schema object containing a response.""" + + +class FeaturesAPIShieldOperationFeatureParameterSchemas(BaseModel): + parameter_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas + + +class FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting(BaseModel): + last_updated: Optional[datetime] = None + + route: Optional[str] = None + """Target route.""" + + +class FeaturesAPIShieldOperationFeatureAPIRouting(BaseModel): + api_routing: Optional[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] = None + """API Routing settings on endpoint.""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99( + BaseModel +): + lower: Optional[float] = None + """Lower bound for percentile estimate""" + + upper: Optional[float] = None + """Upper bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals( + BaseModel +): + p90: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 + ] = None + """Upper and lower bound for percentile estimate""" + + p95: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 + ] = None + """Upper and lower bound for percentile estimate""" + + p99: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 + ] = None + """Upper and lower bound for percentile estimate""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold(BaseModel): + confidence_intervals: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals + ] = None + + mean: Optional[float] = None + """Suggested threshold.""" + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals(BaseModel): + last_updated: Optional[datetime] = None + + suggested_threshold: Optional[ + FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold + ] = None + + +class FeaturesAPIShieldOperationFeatureConfidenceIntervals(BaseModel): + confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] = None + + +class FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema(BaseModel): + id: Optional[str] = None + """UUID""" + + created_at: Optional[datetime] = None + + is_learned: Optional[bool] = None + """True if schema is Cloudflare-provided.""" + + name: Optional[str] = None + """Schema file name.""" + + +class FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo(BaseModel): + active_schema: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] = None + """Schema active on endpoint.""" + + learned_available: Optional[bool] = None + """True if a Cloudflare-provided learned schema is available for this endpoint.""" + + mitigation_action: Optional[Literal["none", "log", "block"]] = None + """Action taken on requests failing validation.""" + + +class FeaturesAPIShieldOperationFeatureSchemaInfo(BaseModel): + schema_info: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] = None + + +Features = Union[ + FeaturesAPIShieldOperationFeatureThresholds, + FeaturesAPIShieldOperationFeatureParameterSchemas, + FeaturesAPIShieldOperationFeatureAPIRouting, + FeaturesAPIShieldOperationFeatureConfidenceIntervals, + FeaturesAPIShieldOperationFeatureSchemaInfo, +] + + +class OperationListResponse(BaseModel): + endpoint: str + """ + The endpoint which can contain path parameter templates in curly braces, each + will be replaced from left to right with {varN}, starting with {var1}, during + insertion. This will further be Cloudflare-normalized upon insertion. See: + https://developers.cloudflare.com/rules/normalization/how-it-works/. + """ + + host: str + """RFC3986-compliant host.""" + + last_updated: datetime + + method: Literal["GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE"] + """The HTTP method used to access the endpoint.""" + + operation_id: str + """UUID""" + + features: Optional[Features] = None diff --git a/src/cloudflare/types/api_gateway/public_schema.py b/src/cloudflare/types/api_gateway/public_schema.py index 6dabec42f5c..bdff5f529aa 100644 --- a/src/cloudflare/types/api_gateway/public_schema.py +++ b/src/cloudflare/types/api_gateway/public_schema.py @@ -19,7 +19,7 @@ class PublicSchema(BaseModel): """Name of the schema""" schema_id: str - """UUID identifier""" + """UUID""" source: Optional[str] = None """Source of the schema""" diff --git a/src/cloudflare/types/api_gateway/user_schema_delete_response.py b/src/cloudflare/types/api_gateway/user_schema_delete_response.py index 5a901e1de91..88f23ea6482 100644 --- a/src/cloudflare/types/api_gateway/user_schema_delete_response.py +++ b/src/cloudflare/types/api_gateway/user_schema_delete_response.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional +from typing import Union __all__ = ["UserSchemaDeleteResponse"] -UserSchemaDeleteResponse = Union[Optional[str], Optional[object]] +UserSchemaDeleteResponse = Union[str, object] diff --git a/src/cloudflare/types/api_gateway/user_schema_list_params.py b/src/cloudflare/types/api_gateway/user_schema_list_params.py index a46fd077690..faca68fa945 100644 --- a/src/cloudflare/types/api_gateway/user_schema_list_params.py +++ b/src/cloudflare/types/api_gateway/user_schema_list_params.py @@ -14,10 +14,10 @@ class UserSchemaListParams(TypedDict, total=False): omit_source: bool """Omit the source-files of schemas and only retrieve their meta-data.""" - page: object + page: int """Page number of paginated results.""" - per_page: object + per_page: int """Maximum number of results per page.""" validation_enabled: bool diff --git a/src/cloudflare/types/api_gateway/user_schemas/operation_list_params.py b/src/cloudflare/types/api_gateway/user_schemas/operation_list_params.py index 8e6eaebd97b..64cb5bdccae 100644 --- a/src/cloudflare/types/api_gateway/user_schemas/operation_list_params.py +++ b/src/cloudflare/types/api_gateway/user_schemas/operation_list_params.py @@ -37,8 +37,8 @@ class OperationListParams(TypedDict, total=False): schema that already exist in API Shield Endpoint Management. """ - page: object + page: int """Page number of paginated results.""" - per_page: object + per_page: int """Maximum number of results per page.""" diff --git a/tests/api_resources/api_gateway/discovery/test_operations.py b/tests/api_resources/api_gateway/discovery/test_operations.py index f88028bff92..b08333fa51c 100644 --- a/tests/api_resources/api_gateway/discovery/test_operations.py +++ b/tests/api_resources/api_gateway/discovery/test_operations.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.api_gateway import DiscoveryOperation from cloudflare.types.api_gateway.discovery import OperationEditResponse @@ -24,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: operation = client.api_gateway.discovery.operations.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: @@ -37,11 +37,11 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: method=["GET"], order="method", origin="ML", - page={}, - per_page={}, + page=1, + per_page=5, state="review", ) - assert_matches_type(SyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -52,7 +52,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(SyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: @@ -63,7 +63,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(SyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +77,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: operation = client.api_gateway.discovery.operations.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationEditResponse, operation, path=["response"]) @@ -85,7 +85,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: operation = client.api_gateway.discovery.operations.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", state="review", ) @@ -94,7 +94,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.api_gateway.discovery.operations.with_raw_response.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -106,7 +106,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.api_gateway.discovery.operations.with_streaming_response.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -121,7 +121,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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.discovery.operations.with_raw_response.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) @@ -140,7 +140,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.discovery.operations.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -153,11 +153,11 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) method=["GET"], order="method", origin="ML", - page={}, - per_page={}, + page=1, + per_page=5, state="review", ) - assert_matches_type(AsyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @@ -168,7 +168,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(AsyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: @@ -179,7 +179,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(AsyncSinglePage[DiscoveryOperation], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DiscoveryOperation], operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -193,7 +193,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.discovery.operations.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationEditResponse, operation, path=["response"]) @@ -201,7 +201,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.discovery.operations.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", state="review", ) @@ -210,7 +210,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.discovery.operations.with_raw_response.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -222,7 +222,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.discovery.operations.with_streaming_response.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -237,7 +237,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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.discovery.operations.with_raw_response.edit( - operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) diff --git a/tests/api_resources/api_gateway/test_configurations.py b/tests/api_resources/api_gateway/test_configurations.py index 675123bd057..13bdbc85420 100644 --- a/tests/api_resources/api_gateway/test_configurations.py +++ b/tests/api_resources/api_gateway/test_configurations.py @@ -22,13 +22,6 @@ class TestConfigurations: @parametrize def test_method_update(self, client: Cloudflare) -> None: - configuration = client.api_gateway.configurations.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: configuration = client.api_gateway.configurations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", auth_id_characteristics=[ @@ -44,6 +37,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: response = client.api_gateway.configurations.with_raw_response.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", + auth_id_characteristics=[ + { + "name": "authorization", + "type": "header", + } + ], ) assert response.is_closed is True @@ -55,6 +54,12 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with client.api_gateway.configurations.with_streaming_response.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", + auth_id_characteristics=[ + { + "name": "authorization", + "type": "header", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,6 +74,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.configurations.with_raw_response.update( zone_id="", + auth_id_characteristics=[ + { + "name": "authorization", + "type": "header", + } + ], ) @parametrize @@ -123,13 +134,6 @@ class TestAsyncConfigurations: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: - configuration = await async_client.api_gateway.configurations.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.api_gateway.configurations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", auth_id_characteristics=[ @@ -145,6 +149,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.configurations.with_raw_response.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", + auth_id_characteristics=[ + { + "name": "authorization", + "type": "header", + } + ], ) assert response.is_closed is True @@ -156,6 +166,12 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.configurations.with_streaming_response.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", + auth_id_characteristics=[ + { + "name": "authorization", + "type": "header", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -170,6 +186,12 @@ async def test_path_params_update(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.configurations.with_raw_response.update( zone_id="", + auth_id_characteristics=[ + { + "name": "authorization", + "type": "header", + } + ], ) @parametrize diff --git a/tests/api_resources/api_gateway/test_operations.py b/tests/api_resources/api_gateway/test_operations.py index e6b994c1ebb..2e4570286b5 100644 --- a/tests/api_resources/api_gateway/test_operations.py +++ b/tests/api_resources/api_gateway/test_operations.py @@ -3,15 +3,16 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.api_gateway import ( - APIShield, + OperationGetResponse, + OperationListResponse, OperationCreateResponse, OperationDeleteResponse, ) @@ -44,7 +45,7 @@ def test_method_create(self, client: Cloudflare) -> None: }, ], ) - assert_matches_type(Optional[OperationCreateResponse], operation, path=["response"]) + assert_matches_type(OperationCreateResponse, operation, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: @@ -72,7 +73,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(Optional[OperationCreateResponse], operation, path=["response"]) + assert_matches_type(OperationCreateResponse, operation, path=["response"]) @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: @@ -100,7 +101,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(Optional[OperationCreateResponse], operation, path=["response"]) + assert_matches_type(OperationCreateResponse, operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +134,7 @@ def test_method_list(self, client: Cloudflare) -> None: operation = client.api_gateway.operations.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: @@ -145,10 +146,10 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: host=["api.cloudflare.com"], method=["GET"], order="method", - page={}, + page=1, per_page=5, ) - assert_matches_type(SyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -159,7 +160,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(SyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: @@ -170,7 +171,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(SyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -235,7 +236,7 @@ def test_method_get(self, client: Cloudflare) -> None: operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: @@ -244,7 +245,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", feature=["thresholds"], ) - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: @@ -256,7 +257,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: @@ -268,7 +269,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -312,7 +313,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: }, ], ) - assert_matches_type(Optional[OperationCreateResponse], operation, path=["response"]) + assert_matches_type(OperationCreateResponse, operation, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @@ -340,7 +341,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(Optional[OperationCreateResponse], operation, path=["response"]) + assert_matches_type(OperationCreateResponse, operation, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: @@ -368,7 +369,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(Optional[OperationCreateResponse], operation, path=["response"]) + assert_matches_type(OperationCreateResponse, operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -401,7 +402,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.operations.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -413,10 +414,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) host=["api.cloudflare.com"], method=["GET"], order="method", - page={}, + page=1, per_page=5, ) - assert_matches_type(AsyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @@ -427,7 +428,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(AsyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: @@ -438,7 +439,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(AsyncSinglePage[APIShield], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -503,7 +504,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -512,7 +513,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - zone_id="023e105f4ecef8ad9ca31a8372d0c353", feature=["thresholds"], ) - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @@ -524,7 +525,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: @@ -536,7 +537,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(APIShield, operation, path=["response"]) + assert_matches_type(OperationGetResponse, operation, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/api_gateway/test_user_schemas.py b/tests/api_resources/api_gateway/test_user_schemas.py index e4b1af33b96..287bc62373d 100644 --- a/tests/api_resources/api_gateway/test_user_schemas.py +++ b/tests/api_resources/api_gateway/test_user_schemas.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +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.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.api_gateway import ( PublicSchema, SchemaUpload, @@ -84,18 +84,18 @@ def test_method_list(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", omit_source=True, - page={}, - per_page={}, + page=1, + per_page=5, validation_enabled=True, ) - assert_matches_type(SyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -106,7 +106,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = response.parse() - assert_matches_type(SyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: @@ -117,7 +117,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = response.parse() - assert_matches_type(SyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @@ -134,7 +134,7 @@ def test_method_delete(self, client: Cloudflare) -> None: schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + assert_matches_type(Optional[UserSchemaDeleteResponse], user_schema, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: @@ -146,7 +146,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = response.parse() - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + assert_matches_type(Optional[UserSchemaDeleteResponse], user_schema, path=["response"]) @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: @@ -158,7 +158,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = response.parse() - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + assert_matches_type(Optional[UserSchemaDeleteResponse], user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @@ -356,18 +356,18 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", omit_source=True, - page={}, - per_page={}, + page=1, + per_page=5, validation_enabled=True, ) - assert_matches_type(AsyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @@ -378,7 +378,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = await response.parse() - assert_matches_type(AsyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: @@ -389,7 +389,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = await response.parse() - assert_matches_type(AsyncSinglePage[PublicSchema], user_schema, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @@ -406,7 +406,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + assert_matches_type(Optional[UserSchemaDeleteResponse], user_schema, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @@ -418,7 +418,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = await response.parse() - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + assert_matches_type(Optional[UserSchemaDeleteResponse], user_schema, path=["response"]) @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: @@ -430,7 +430,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" user_schema = await response.parse() - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + assert_matches_type(Optional[UserSchemaDeleteResponse], user_schema, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/api_gateway/user_schemas/test_operations.py b/tests/api_resources/api_gateway/user_schemas/test_operations.py index a613b248c2a..64234507893 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_operations.py +++ b/tests/api_resources/api_gateway/user_schemas/test_operations.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.api_gateway.user_schemas import OperationListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: @@ -36,10 +36,10 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: host=["api.cloudflare.com"], method=["GET"], operation_status="new", - page={}, - per_page={}, + page=1, + per_page=5, ) - assert_matches_type(SyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -51,7 +51,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(SyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: @@ -63,7 +63,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = response.parse() - assert_matches_type(SyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -91,7 +91,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -103,10 +103,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) host=["api.cloudflare.com"], method=["GET"], operation_status="new", - page={}, - per_page={}, + page=1, + per_page=5, ) - assert_matches_type(AsyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @@ -118,7 +118,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(AsyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: @@ -130,7 +130,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" operation = await response.parse() - assert_matches_type(AsyncSinglePage[OperationListResponse], operation, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) assert cast(Any, response.is_closed) is True From 25951eeb48ae88ce35f9f86116d3cbacc45bc1b2 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 11:50:03 +0000 Subject: [PATCH 300/316] 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 a7c4ebd6ec6..52443f332f3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b116e60da4a69a05bc8823c2397e4a33d111c82a6b458ea4f480d0ba52ea8de0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4fe9e72f2ca3a9f013a0503f5897b29ee09b11a31b35d8aab7cb30a0eef3c7b9.yml From 90c31867607cacc0df92c7522cb87ab0cb1cff5f Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 12:21:26 +0000 Subject: [PATCH 301/316] 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 52443f332f3..6667dae101f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4fe9e72f2ca3a9f013a0503f5897b29ee09b11a31b35d8aab7cb30a0eef3c7b9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e7569b9c7e9a73075d5465337de0b57bc8776904ca4fe5190118d5960c390130.yml From 9c895b4f42765ea9cc36239c55a3cc3cb59ceac4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 12:38:21 +0000 Subject: [PATCH 302/316] 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 6667dae101f..de350b884f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e7569b9c7e9a73075d5465337de0b57bc8776904ca4fe5190118d5960c390130.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dc191ddbe3d3013cd1f90d1747ebd7022d0f938d1e547eb284ae675d34c87e78.yml From 8ea5be246f8471bc252df1dd431c45bc428d08b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:40:42 +0000 Subject: [PATCH 303/316] feat(api): OpenAPI spec update via Stainless API (#1192) --- .stats.yml | 2 +- src/cloudflare/resources/d1/database.py | 37 ++++++++++++++++++- .../types/d1/database_create_params.py | 9 ++++- .../types/d1/database_query_params.py | 5 +++ .../types/d1/database_raw_params.py | 5 +++ tests/api_resources/d1/test_database.py | 18 +++++++++ 6 files changed, 72 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index de350b884f5..d61ced56609 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dc191ddbe3d3013cd1f90d1747ebd7022d0f938d1e547eb284ae675d34c87e78.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2a553d49ea7dea09efa86fd5af7cdaba8c2a757071c4114a4d8de234cbcdc740.yml diff --git a/src/cloudflare/resources/d1/database.py b/src/cloudflare/resources/d1/database.py index 7223084588d..14a2dfce413 100644 --- a/src/cloudflare/resources/d1/database.py +++ b/src/cloudflare/resources/d1/database.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import Any, List, Type, cast +from typing_extensions import Literal import httpx @@ -47,6 +48,7 @@ def create( *, account_id: str, name: str, + primary_location_hint: Literal["wnam", "enam", "weur", "eeur", "apac", "oc"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -60,6 +62,9 @@ def create( Args: account_id: Account identifier tag. + primary_location_hint: Specify the region to create the D1 primary, if available. If this option is + omitted, the D1 will be created as close as possible to the current user. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -72,7 +77,13 @@ def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._post( f"/accounts/{account_id}/d1/database", - body=maybe_transform({"name": name}, database_create_params.DatabaseCreateParams), + body=maybe_transform( + { + "name": name, + "primary_location_hint": primary_location_hint, + }, + database_create_params.DatabaseCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -248,6 +259,9 @@ def query( Args: account_id: Account identifier tag. + sql: Your SQL query. Supports multiple statements, joined by semicolons, which will + be executed as a batch. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -301,6 +315,9 @@ def raw( Args: account_id: Account identifier tag. + sql: Your SQL query. Supports multiple statements, joined by semicolons, which will + be executed as a batch. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -347,6 +364,7 @@ async def create( *, account_id: str, name: str, + primary_location_hint: Literal["wnam", "enam", "weur", "eeur", "apac", "oc"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -360,6 +378,9 @@ async def create( Args: account_id: Account identifier tag. + primary_location_hint: Specify the region to create the D1 primary, if available. If this option is + omitted, the D1 will be created as close as possible to the current user. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -372,7 +393,13 @@ async def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._post( f"/accounts/{account_id}/d1/database", - body=await async_maybe_transform({"name": name}, database_create_params.DatabaseCreateParams), + body=await async_maybe_transform( + { + "name": name, + "primary_location_hint": primary_location_hint, + }, + database_create_params.DatabaseCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -548,6 +575,9 @@ async def query( Args: account_id: Account identifier tag. + sql: Your SQL query. Supports multiple statements, joined by semicolons, which will + be executed as a batch. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -601,6 +631,9 @@ async def raw( Args: account_id: Account identifier tag. + sql: Your SQL query. Supports multiple statements, joined by semicolons, which will + be executed as a batch. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/cloudflare/types/d1/database_create_params.py b/src/cloudflare/types/d1/database_create_params.py index e71180e85dd..3db8ef15021 100644 --- a/src/cloudflare/types/d1/database_create_params.py +++ b/src/cloudflare/types/d1/database_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["DatabaseCreateParams"] @@ -12,3 +12,10 @@ class DatabaseCreateParams(TypedDict, total=False): """Account identifier tag.""" name: Required[str] + + primary_location_hint: Literal["wnam", "enam", "weur", "eeur", "apac", "oc"] + """Specify the region to create the D1 primary, if available. + + If this option is omitted, the D1 will be created as close as possible to the + current user. + """ diff --git a/src/cloudflare/types/d1/database_query_params.py b/src/cloudflare/types/d1/database_query_params.py index 5c33fb076cb..f7c06437625 100644 --- a/src/cloudflare/types/d1/database_query_params.py +++ b/src/cloudflare/types/d1/database_query_params.py @@ -13,5 +13,10 @@ class DatabaseQueryParams(TypedDict, total=False): """Account identifier tag.""" sql: Required[str] + """Your SQL query. + + Supports multiple statements, joined by semicolons, which will be executed as a + batch. + """ params: List[str] diff --git a/src/cloudflare/types/d1/database_raw_params.py b/src/cloudflare/types/d1/database_raw_params.py index 9c056647b21..5a7fd0ae2e3 100644 --- a/src/cloudflare/types/d1/database_raw_params.py +++ b/src/cloudflare/types/d1/database_raw_params.py @@ -13,5 +13,10 @@ class DatabaseRawParams(TypedDict, total=False): """Account identifier tag.""" sql: Required[str] + """Your SQL query. + + Supports multiple statements, joined by semicolons, which will be executed as a + batch. + """ params: List[str] diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py index 58ce4be1a90..d0ade522942 100644 --- a/tests/api_resources/d1/test_database.py +++ b/tests/api_resources/d1/test_database.py @@ -33,6 +33,15 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + database = client.d1.database.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="my-database", + primary_location_hint="wnam", + ) + assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.create( @@ -349,6 +358,15 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + database = await async_client.d1.database.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="my-database", + primary_location_hint="wnam", + ) + assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.create( From 20e4aff929e766d279507d97489f5059d5d2b770 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 13:44:50 +0000 Subject: [PATCH 304/316] 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 d61ced56609..8195c15626b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2a553d49ea7dea09efa86fd5af7cdaba8c2a757071c4114a4d8de234cbcdc740.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-631b9d0d61d56c9bcffbbf496ccfa7daa86b8e627fe008bf17ab367f252074ba.yml From 0bfa95acf64fa8b6682388cad93e04062ffface1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:57:09 +0000 Subject: [PATCH 305/316] feat(api): OpenAPI spec update via Stainless API (#1193) --- .stats.yml | 2 +- src/cloudflare/types/accounts/member_delete_response.py | 1 - src/cloudflare/types/cache/cache_purge_response.py | 1 - src/cloudflare/types/firewall/access_rule_delete_response.py | 1 - src/cloudflare/types/firewall/deleted_filter.py | 1 - src/cloudflare/types/iam/resource_group_delete_response.py | 1 - src/cloudflare/types/keyless_certificates/tunnel.py | 1 - src/cloudflare/types/kv/namespace_delete_response.py | 1 - src/cloudflare/types/kv/namespace_update_response.py | 1 - src/cloudflare/types/kv/namespaces/bulk_delete_response.py | 1 - src/cloudflare/types/kv/namespaces/bulk_update_response.py | 1 - src/cloudflare/types/kv/namespaces/value_delete_response.py | 1 - src/cloudflare/types/kv/namespaces/value_update_response.py | 1 - src/cloudflare/types/page_shield/page_shield_update_response.py | 1 - src/cloudflare/types/page_shield/setting.py | 1 - src/cloudflare/types/pagerules/pagerule_delete_response.py | 1 - src/cloudflare/types/radar/bgp/route_stats_response.py | 1 - src/cloudflare/types/radar/dataset_download_response.py | 1 - .../types/radar/email/routing/timeseries_group_arc_response.py | 1 - .../types/radar/email/routing/timeseries_group_dkim_response.py | 1 - .../radar/email/routing/timeseries_group_dmarc_response.py | 1 - .../types/radar/email/routing/timeseries_group_spf_response.py | 1 - .../types/radar/email/security/timeseries_group_arc_response.py | 1 - .../radar/email/security/timeseries_group_dkim_response.py | 1 - .../radar/email/security/timeseries_group_dmarc_response.py | 1 - .../types/radar/email/security/timeseries_group_spf_response.py | 1 - src/cloudflare/types/radar/http/browser.py | 1 - src/cloudflare/types/rules/hostname.py | 1 - src/cloudflare/types/rulesets/logging.py | 1 - src/cloudflare/types/secondary_dns/acl.py | 1 - src/cloudflare/types/secondary_dns/tsig.py | 1 - src/cloudflare/types/shared/asn.py | 2 -- src/cloudflare/types/shared/permission.py | 2 -- src/cloudflare/types/shared/response_info.py | 1 - src/cloudflare/types/user/token_delete_response.py | 1 - src/cloudflare/types/waiting_rooms/setting_edit_response.py | 1 - src/cloudflare/types/waiting_rooms/setting_get_response.py | 1 - src/cloudflare/types/waiting_rooms/setting_update_response.py | 1 - src/cloudflare/types/web3/hostname_delete_response.py | 1 - .../ipfs_universal_paths/content_lists/entry_delete_response.py | 1 - .../zero_trust/access/certificates/certificate_settings.py | 1 - src/cloudflare/types/zero_trust/access_device_posture_rule.py | 1 - src/cloudflare/types/zero_trust/any_valid_service_token_rule.py | 1 - src/cloudflare/types/zero_trust/authentication_method_rule.py | 1 - src/cloudflare/types/zero_trust/certificate_rule.py | 1 - src/cloudflare/types/zero_trust/country_rule.py | 1 - src/cloudflare/types/zero_trust/device_experience_monitor.py | 1 - .../types/zero_trust/devices/client_certificate_input.py | 1 - src/cloudflare/types/zero_trust/dlp/context_awareness.py | 1 - src/cloudflare/types/zero_trust/dlp/skip_configuration.py | 1 - src/cloudflare/types/zero_trust/domain_rule.py | 1 - src/cloudflare/types/zero_trust/email_list_rule.py | 1 - src/cloudflare/types/zero_trust/email_rule.py | 1 - src/cloudflare/types/zero_trust/everyone_rule.py | 1 - src/cloudflare/types/zero_trust/external_evaluation_rule.py | 1 - src/cloudflare/types/zero_trust/group_rule.py | 1 - src/cloudflare/types/zero_trust/gsuite_group_rule.py | 1 - src/cloudflare/types/zero_trust/ip_list_rule.py | 1 - src/cloudflare/types/zero_trust/ip_rule.py | 1 - src/cloudflare/types/zero_trust/okta_group_rule.py | 1 - src/cloudflare/types/zero_trust/saml_group_rule.py | 1 - src/cloudflare/types/zero_trust/service_token_rule.py | 1 - src/cloudflare/types/zones/zone_delete_response.py | 1 - 63 files changed, 1 insertion(+), 65 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8195c15626b..21a17687b3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-631b9d0d61d56c9bcffbbf496ccfa7daa86b8e627fe008bf17ab367f252074ba.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml diff --git a/src/cloudflare/types/accounts/member_delete_response.py b/src/cloudflare/types/accounts/member_delete_response.py index 78ae311b6e5..77717aeeeb9 100644 --- a/src/cloudflare/types/accounts/member_delete_response.py +++ b/src/cloudflare/types/accounts/member_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["MemberDeleteResponse"] diff --git a/src/cloudflare/types/cache/cache_purge_response.py b/src/cloudflare/types/cache/cache_purge_response.py index ea34ba55610..f9d84123a29 100644 --- a/src/cloudflare/types/cache/cache_purge_response.py +++ b/src/cloudflare/types/cache/cache_purge_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["CachePurgeResponse"] diff --git a/src/cloudflare/types/firewall/access_rule_delete_response.py b/src/cloudflare/types/firewall/access_rule_delete_response.py index 2dc451a144c..3e76fc0182b 100644 --- a/src/cloudflare/types/firewall/access_rule_delete_response.py +++ b/src/cloudflare/types/firewall/access_rule_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["AccessRuleDeleteResponse"] diff --git a/src/cloudflare/types/firewall/deleted_filter.py b/src/cloudflare/types/firewall/deleted_filter.py index 8eb4d27b96e..2f81710d06b 100644 --- a/src/cloudflare/types/firewall/deleted_filter.py +++ b/src/cloudflare/types/firewall/deleted_filter.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["DeletedFilter"] diff --git a/src/cloudflare/types/iam/resource_group_delete_response.py b/src/cloudflare/types/iam/resource_group_delete_response.py index 604eafbe8f0..d9472de8c27 100644 --- a/src/cloudflare/types/iam/resource_group_delete_response.py +++ b/src/cloudflare/types/iam/resource_group_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["ResourceGroupDeleteResponse"] diff --git a/src/cloudflare/types/keyless_certificates/tunnel.py b/src/cloudflare/types/keyless_certificates/tunnel.py index 9a8b2936da6..6aa966dd5c7 100644 --- a/src/cloudflare/types/keyless_certificates/tunnel.py +++ b/src/cloudflare/types/keyless_certificates/tunnel.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["Tunnel"] diff --git a/src/cloudflare/types/kv/namespace_delete_response.py b/src/cloudflare/types/kv/namespace_delete_response.py index eb6f28e4253..9f3c63195c7 100644 --- a/src/cloudflare/types/kv/namespace_delete_response.py +++ b/src/cloudflare/types/kv/namespace_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["NamespaceDeleteResponse"] diff --git a/src/cloudflare/types/kv/namespace_update_response.py b/src/cloudflare/types/kv/namespace_update_response.py index b8f763fc2e9..6bafe0d03fb 100644 --- a/src/cloudflare/types/kv/namespace_update_response.py +++ b/src/cloudflare/types/kv/namespace_update_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["NamespaceUpdateResponse"] diff --git a/src/cloudflare/types/kv/namespaces/bulk_delete_response.py b/src/cloudflare/types/kv/namespaces/bulk_delete_response.py index 4ae88607764..5982193c7b1 100644 --- a/src/cloudflare/types/kv/namespaces/bulk_delete_response.py +++ b/src/cloudflare/types/kv/namespaces/bulk_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["BulkDeleteResponse"] diff --git a/src/cloudflare/types/kv/namespaces/bulk_update_response.py b/src/cloudflare/types/kv/namespaces/bulk_update_response.py index 55544c65e54..3ab1dbb71be 100644 --- a/src/cloudflare/types/kv/namespaces/bulk_update_response.py +++ b/src/cloudflare/types/kv/namespaces/bulk_update_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["BulkUpdateResponse"] diff --git a/src/cloudflare/types/kv/namespaces/value_delete_response.py b/src/cloudflare/types/kv/namespaces/value_delete_response.py index 224a80852b0..c0446010d3a 100644 --- a/src/cloudflare/types/kv/namespaces/value_delete_response.py +++ b/src/cloudflare/types/kv/namespaces/value_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["ValueDeleteResponse"] diff --git a/src/cloudflare/types/kv/namespaces/value_update_response.py b/src/cloudflare/types/kv/namespaces/value_update_response.py index 40ffa943af8..ca6dfd751bb 100644 --- a/src/cloudflare/types/kv/namespaces/value_update_response.py +++ b/src/cloudflare/types/kv/namespaces/value_update_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["ValueUpdateResponse"] diff --git a/src/cloudflare/types/page_shield/page_shield_update_response.py b/src/cloudflare/types/page_shield/page_shield_update_response.py index ad2852df732..ab88144363c 100644 --- a/src/cloudflare/types/page_shield/page_shield_update_response.py +++ b/src/cloudflare/types/page_shield/page_shield_update_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["PageShieldUpdateResponse"] diff --git a/src/cloudflare/types/page_shield/setting.py b/src/cloudflare/types/page_shield/setting.py index 46e4fd6da65..9686d461ff0 100644 --- a/src/cloudflare/types/page_shield/setting.py +++ b/src/cloudflare/types/page_shield/setting.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["Setting"] diff --git a/src/cloudflare/types/pagerules/pagerule_delete_response.py b/src/cloudflare/types/pagerules/pagerule_delete_response.py index eb624fc4873..d90b3c2a02b 100644 --- a/src/cloudflare/types/pagerules/pagerule_delete_response.py +++ b/src/cloudflare/types/pagerules/pagerule_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["PageruleDeleteResponse"] diff --git a/src/cloudflare/types/radar/bgp/route_stats_response.py b/src/cloudflare/types/radar/bgp/route_stats_response.py index 65e83a79c49..a410062e4d5 100644 --- a/src/cloudflare/types/radar/bgp/route_stats_response.py +++ b/src/cloudflare/types/radar/bgp/route_stats_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["RouteStatsResponse", "Meta", "Stats"] diff --git a/src/cloudflare/types/radar/dataset_download_response.py b/src/cloudflare/types/radar/dataset_download_response.py index 3b8bb8376db..e228f866343 100644 --- a/src/cloudflare/types/radar/dataset_download_response.py +++ b/src/cloudflare/types/radar/dataset_download_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["DatasetDownloadResponse", "Dataset"] diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_arc_response.py b/src/cloudflare/types/radar/email/routing/timeseries_group_arc_response.py index 68e15b2ca03..d3f31f162dd 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_arc_response.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_arc_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_response.py b/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_response.py index 0495c34b231..7326ae59341 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_response.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_dkim_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_response.py b/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_response.py index 2221b842e79..a27240408df 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_response.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_dmarc_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/email/routing/timeseries_group_spf_response.py b/src/cloudflare/types/radar/email/routing/timeseries_group_spf_response.py index fbca7a77baf..4e520fda2fa 100644 --- a/src/cloudflare/types/radar/email/routing/timeseries_group_spf_response.py +++ b/src/cloudflare/types/radar/email/routing/timeseries_group_spf_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_arc_response.py b/src/cloudflare/types/radar/email/security/timeseries_group_arc_response.py index 68e15b2ca03..d3f31f162dd 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_arc_response.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_arc_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_dkim_response.py b/src/cloudflare/types/radar/email/security/timeseries_group_dkim_response.py index 0495c34b231..7326ae59341 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_dkim_response.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_dkim_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_response.py b/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_response.py index 2221b842e79..a27240408df 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_response.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_dmarc_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/email/security/timeseries_group_spf_response.py b/src/cloudflare/types/radar/email/security/timeseries_group_spf_response.py index fbca7a77baf..4e520fda2fa 100644 --- a/src/cloudflare/types/radar/email/security/timeseries_group_spf_response.py +++ b/src/cloudflare/types/radar/email/security/timeseries_group_spf_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel from ...radar_email_series import RadarEmailSeries diff --git a/src/cloudflare/types/radar/http/browser.py b/src/cloudflare/types/radar/http/browser.py index e76a9749ce1..a227def8dd5 100644 --- a/src/cloudflare/types/radar/http/browser.py +++ b/src/cloudflare/types/radar/http/browser.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["Browser"] diff --git a/src/cloudflare/types/rules/hostname.py b/src/cloudflare/types/rules/hostname.py index 04acdbc5d7b..f08bcc8a39e 100644 --- a/src/cloudflare/types/rules/hostname.py +++ b/src/cloudflare/types/rules/hostname.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["Hostname"] diff --git a/src/cloudflare/types/rulesets/logging.py b/src/cloudflare/types/rulesets/logging.py index 6e4bb74304d..30288f7c3a9 100644 --- a/src/cloudflare/types/rulesets/logging.py +++ b/src/cloudflare/types/rulesets/logging.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["Logging"] diff --git a/src/cloudflare/types/secondary_dns/acl.py b/src/cloudflare/types/secondary_dns/acl.py index 41bea938293..375990882a0 100644 --- a/src/cloudflare/types/secondary_dns/acl.py +++ b/src/cloudflare/types/secondary_dns/acl.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["ACL"] diff --git a/src/cloudflare/types/secondary_dns/tsig.py b/src/cloudflare/types/secondary_dns/tsig.py index 0c270b791d6..d5642ba3b72 100644 --- a/src/cloudflare/types/secondary_dns/tsig.py +++ b/src/cloudflare/types/secondary_dns/tsig.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["TSIG"] diff --git a/src/cloudflare/types/shared/asn.py b/src/cloudflare/types/shared/asn.py index 429e7bf4301..6604efb8690 100644 --- a/src/cloudflare/types/shared/asn.py +++ b/src/cloudflare/types/shared/asn.py @@ -1,8 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - __all__ = ["ASN"] ASN = int diff --git a/src/cloudflare/types/shared/permission.py b/src/cloudflare/types/shared/permission.py index 09793e2cb6f..ccaf9fcdf5e 100644 --- a/src/cloudflare/types/shared/permission.py +++ b/src/cloudflare/types/shared/permission.py @@ -1,8 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - __all__ = ["Permission"] Permission = str diff --git a/src/cloudflare/types/shared/response_info.py b/src/cloudflare/types/shared/response_info.py index 3208261ab12..2124a5abb4d 100644 --- a/src/cloudflare/types/shared/response_info.py +++ b/src/cloudflare/types/shared/response_info.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["ResponseInfo"] diff --git a/src/cloudflare/types/user/token_delete_response.py b/src/cloudflare/types/user/token_delete_response.py index bcf86ebe198..fbc713c6a5f 100644 --- a/src/cloudflare/types/user/token_delete_response.py +++ b/src/cloudflare/types/user/token_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["TokenDeleteResponse"] diff --git a/src/cloudflare/types/waiting_rooms/setting_edit_response.py b/src/cloudflare/types/waiting_rooms/setting_edit_response.py index bae5f32f498..08a546fea26 100644 --- a/src/cloudflare/types/waiting_rooms/setting_edit_response.py +++ b/src/cloudflare/types/waiting_rooms/setting_edit_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["SettingEditResponse"] diff --git a/src/cloudflare/types/waiting_rooms/setting_get_response.py b/src/cloudflare/types/waiting_rooms/setting_get_response.py index 1f349caa00f..4142346dc99 100644 --- a/src/cloudflare/types/waiting_rooms/setting_get_response.py +++ b/src/cloudflare/types/waiting_rooms/setting_get_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["SettingGetResponse"] diff --git a/src/cloudflare/types/waiting_rooms/setting_update_response.py b/src/cloudflare/types/waiting_rooms/setting_update_response.py index 756f6b7045d..59efc139003 100644 --- a/src/cloudflare/types/waiting_rooms/setting_update_response.py +++ b/src/cloudflare/types/waiting_rooms/setting_update_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["SettingUpdateResponse"] diff --git a/src/cloudflare/types/web3/hostname_delete_response.py b/src/cloudflare/types/web3/hostname_delete_response.py index 44db180c19c..4d2f971c072 100644 --- a/src/cloudflare/types/web3/hostname_delete_response.py +++ b/src/cloudflare/types/web3/hostname_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["HostnameDeleteResponse"] diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py index 12b15777367..40a1f3c70aa 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ......_models import BaseModel __all__ = ["EntryDeleteResponse"] diff --git a/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py b/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py index d120c65c65e..078403a29ef 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py +++ b/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ....._models import BaseModel __all__ = ["CertificateSettings"] diff --git a/src/cloudflare/types/zero_trust/access_device_posture_rule.py b/src/cloudflare/types/zero_trust/access_device_posture_rule.py index d4eb806317e..52525a17f74 100644 --- a/src/cloudflare/types/zero_trust/access_device_posture_rule.py +++ b/src/cloudflare/types/zero_trust/access_device_posture_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["AccessDevicePostureRule", "DevicePosture"] diff --git a/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py b/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py index 9ab0ef01a37..7f4f2b5344f 100644 --- a/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py +++ b/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["AnyValidServiceTokenRule"] diff --git a/src/cloudflare/types/zero_trust/authentication_method_rule.py b/src/cloudflare/types/zero_trust/authentication_method_rule.py index ab9bdced279..8352714c076 100644 --- a/src/cloudflare/types/zero_trust/authentication_method_rule.py +++ b/src/cloudflare/types/zero_trust/authentication_method_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["AuthenticationMethodRule", "AuthMethod"] diff --git a/src/cloudflare/types/zero_trust/certificate_rule.py b/src/cloudflare/types/zero_trust/certificate_rule.py index fb76060608c..0e0ed3cff1f 100644 --- a/src/cloudflare/types/zero_trust/certificate_rule.py +++ b/src/cloudflare/types/zero_trust/certificate_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["CertificateRule"] diff --git a/src/cloudflare/types/zero_trust/country_rule.py b/src/cloudflare/types/zero_trust/country_rule.py index 0d84bda7097..060eda47066 100644 --- a/src/cloudflare/types/zero_trust/country_rule.py +++ b/src/cloudflare/types/zero_trust/country_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["CountryRule", "Geo"] diff --git a/src/cloudflare/types/zero_trust/device_experience_monitor.py b/src/cloudflare/types/zero_trust/device_experience_monitor.py index cb84b45bfba..2ee952e9caf 100644 --- a/src/cloudflare/types/zero_trust/device_experience_monitor.py +++ b/src/cloudflare/types/zero_trust/device_experience_monitor.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["DeviceExperienceMonitor"] diff --git a/src/cloudflare/types/zero_trust/devices/client_certificate_input.py b/src/cloudflare/types/zero_trust/devices/client_certificate_input.py index e8dc8dc8ba3..df018c97527 100644 --- a/src/cloudflare/types/zero_trust/devices/client_certificate_input.py +++ b/src/cloudflare/types/zero_trust/devices/client_certificate_input.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["ClientCertificateInput"] diff --git a/src/cloudflare/types/zero_trust/dlp/context_awareness.py b/src/cloudflare/types/zero_trust/dlp/context_awareness.py index fceb2c25057..58ac38d0456 100644 --- a/src/cloudflare/types/zero_trust/dlp/context_awareness.py +++ b/src/cloudflare/types/zero_trust/dlp/context_awareness.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel from .skip_configuration import SkipConfiguration diff --git a/src/cloudflare/types/zero_trust/dlp/skip_configuration.py b/src/cloudflare/types/zero_trust/dlp/skip_configuration.py index 5a525608141..710f5e59ec2 100644 --- a/src/cloudflare/types/zero_trust/dlp/skip_configuration.py +++ b/src/cloudflare/types/zero_trust/dlp/skip_configuration.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ...._models import BaseModel __all__ = ["SkipConfiguration"] diff --git a/src/cloudflare/types/zero_trust/domain_rule.py b/src/cloudflare/types/zero_trust/domain_rule.py index 7c469d7a2a4..9bb961498ca 100644 --- a/src/cloudflare/types/zero_trust/domain_rule.py +++ b/src/cloudflare/types/zero_trust/domain_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["DomainRule", "EmailDomain"] diff --git a/src/cloudflare/types/zero_trust/email_list_rule.py b/src/cloudflare/types/zero_trust/email_list_rule.py index 4323cde054f..bda960c806a 100644 --- a/src/cloudflare/types/zero_trust/email_list_rule.py +++ b/src/cloudflare/types/zero_trust/email_list_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["EmailListRule", "EmailList"] diff --git a/src/cloudflare/types/zero_trust/email_rule.py b/src/cloudflare/types/zero_trust/email_rule.py index 4e56f956384..2333b69cb11 100644 --- a/src/cloudflare/types/zero_trust/email_rule.py +++ b/src/cloudflare/types/zero_trust/email_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["EmailRule", "Email"] diff --git a/src/cloudflare/types/zero_trust/everyone_rule.py b/src/cloudflare/types/zero_trust/everyone_rule.py index 3077a7b52b3..24b0eeb68d1 100644 --- a/src/cloudflare/types/zero_trust/everyone_rule.py +++ b/src/cloudflare/types/zero_trust/everyone_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["EveryoneRule"] diff --git a/src/cloudflare/types/zero_trust/external_evaluation_rule.py b/src/cloudflare/types/zero_trust/external_evaluation_rule.py index c72a4dea246..d951576746a 100644 --- a/src/cloudflare/types/zero_trust/external_evaluation_rule.py +++ b/src/cloudflare/types/zero_trust/external_evaluation_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["ExternalEvaluationRule", "ExternalEvaluation"] diff --git a/src/cloudflare/types/zero_trust/group_rule.py b/src/cloudflare/types/zero_trust/group_rule.py index def8e72459c..9813013c6a4 100644 --- a/src/cloudflare/types/zero_trust/group_rule.py +++ b/src/cloudflare/types/zero_trust/group_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["GroupRule", "Group"] diff --git a/src/cloudflare/types/zero_trust/gsuite_group_rule.py b/src/cloudflare/types/zero_trust/gsuite_group_rule.py index 589bb8baef3..cdc3df15134 100644 --- a/src/cloudflare/types/zero_trust/gsuite_group_rule.py +++ b/src/cloudflare/types/zero_trust/gsuite_group_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["GSuiteGroupRule", "GSuite"] diff --git a/src/cloudflare/types/zero_trust/ip_list_rule.py b/src/cloudflare/types/zero_trust/ip_list_rule.py index 44db2dcf67c..aac38b6a5af 100644 --- a/src/cloudflare/types/zero_trust/ip_list_rule.py +++ b/src/cloudflare/types/zero_trust/ip_list_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["IPListRule", "IPList"] diff --git a/src/cloudflare/types/zero_trust/ip_rule.py b/src/cloudflare/types/zero_trust/ip_rule.py index 9339b85191c..9b471986a36 100644 --- a/src/cloudflare/types/zero_trust/ip_rule.py +++ b/src/cloudflare/types/zero_trust/ip_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["IPRule", "IP"] diff --git a/src/cloudflare/types/zero_trust/okta_group_rule.py b/src/cloudflare/types/zero_trust/okta_group_rule.py index 9f57c867141..944e2b57e83 100644 --- a/src/cloudflare/types/zero_trust/okta_group_rule.py +++ b/src/cloudflare/types/zero_trust/okta_group_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["OktaGroupRule", "Okta"] diff --git a/src/cloudflare/types/zero_trust/saml_group_rule.py b/src/cloudflare/types/zero_trust/saml_group_rule.py index c1bf9e03312..62f29468875 100644 --- a/src/cloudflare/types/zero_trust/saml_group_rule.py +++ b/src/cloudflare/types/zero_trust/saml_group_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["SAMLGroupRule", "SAML"] diff --git a/src/cloudflare/types/zero_trust/service_token_rule.py b/src/cloudflare/types/zero_trust/service_token_rule.py index a40140c3a32..fcf7a8e36b0 100644 --- a/src/cloudflare/types/zero_trust/service_token_rule.py +++ b/src/cloudflare/types/zero_trust/service_token_rule.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["ServiceTokenRule", "ServiceToken"] diff --git a/src/cloudflare/types/zones/zone_delete_response.py b/src/cloudflare/types/zones/zone_delete_response.py index 55ffb51fd69..2793f03434d 100644 --- a/src/cloudflare/types/zones/zone_delete_response.py +++ b/src/cloudflare/types/zones/zone_delete_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - from ..._models import BaseModel __all__ = ["ZoneDeleteResponse"] From 434690974d3bdaaa34565ba7a26bfe750d16cb9b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 16:14:47 +0000 Subject: [PATCH 306/316] 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 21a17687b3f..ff82b5eaf32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml From ccaeebb547d93eb510b712ef69e34bbd65f5b337 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 16:18:11 +0000 Subject: [PATCH 307/316] 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 ff82b5eaf32..9b8151b5ff9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e71f8f7052fc889506f50599069f307647eb39bde14fdfd9d86d61aec91792e.yml From cf6bd06c4cf2d58b4ac796653f8dd75390ea068c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 17:05:47 +0000 Subject: [PATCH 308/316] 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 9b8151b5ff9..ff82b5eaf32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e71f8f7052fc889506f50599069f307647eb39bde14fdfd9d86d61aec91792e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml From cf3b8d925d286f7c34aeb01e93c42eb7eabcbe57 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 17:09:23 +0000 Subject: [PATCH 309/316] 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 ff82b5eaf32..21a17687b3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml From 512203e85899be0c4ccc8190541335079b2bdca2 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 17:53:38 +0000 Subject: [PATCH 310/316] 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 21a17687b3f..9b8151b5ff9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e71f8f7052fc889506f50599069f307647eb39bde14fdfd9d86d61aec91792e.yml From 598836dfda80bf10c4ca73b257aeb977eb08bc34 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 17:55:51 +0000 Subject: [PATCH 311/316] 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 9b8151b5ff9..ff82b5eaf32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e71f8f7052fc889506f50599069f307647eb39bde14fdfd9d86d61aec91792e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml From a2433f41c70667e2029dc46fa437fc88634a5ed8 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 19:45:55 +0000 Subject: [PATCH 312/316] 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 ff82b5eaf32..fb8dbaea6f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308cb06dd45e1721541e0692ddb5a613862d196db3ecd11796de06dbf697d4e7.yml From e91b45b7f35070dfbb431b7090fb5bd3b23cf6ff Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 20:23:25 +0000 Subject: [PATCH 313/316] 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 fb8dbaea6f1..ff82b5eaf32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308cb06dd45e1721541e0692ddb5a613862d196db3ecd11796de06dbf697d4e7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml From 7850e2040cc1268e175e5ba99385178fa4af153b Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 20:42:16 +0000 Subject: [PATCH 314/316] 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 ff82b5eaf32..fb8dbaea6f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1d097ab6116776e78efde22c6b6d64fc3d086444afcff0c5968f7b135832d63.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308cb06dd45e1721541e0692ddb5a613862d196db3ecd11796de06dbf697d4e7.yml From f0c26a0b5378ab1e6fb945f9a6cec077d75d8542 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 21:18:42 +0000 Subject: [PATCH 315/316] 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 fb8dbaea6f1..21a17687b3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308cb06dd45e1721541e0692ddb5a613862d196db3ecd11796de06dbf697d4e7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml From ed7624ee264a0cece35ecefef19f01595c693e41 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 21:20:11 +0000 Subject: [PATCH 316/316] release: 3.1.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 307 ++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/cloudflare/_version.py | 2 +- 4 files changed, 310 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 56441f9d371..e0dc5001b1a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.1" + ".": "3.1.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d7f748d129..cb4dcb40087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,312 @@ # Changelog +## 3.1.0 (2024-07-16) + +Full Changelog: [v3.0.1...v3.1.0](https://github.com/cloudflare/cloudflare-python/compare/v3.0.1...v3.1.0) + +### Features + +* **api:** add hash to url_scanner ([28c06a7](https://github.com/cloudflare/cloudflare-python/commit/28c06a7fd33c143e5da9b368b70262677d8c5fb4)) +* **api:** OpenAPI spec update via Stainless API ([f0c26a0](https://github.com/cloudflare/cloudflare-python/commit/f0c26a0b5378ab1e6fb945f9a6cec077d75d8542)) +* **api:** OpenAPI spec update via Stainless API ([7850e20](https://github.com/cloudflare/cloudflare-python/commit/7850e2040cc1268e175e5ba99385178fa4af153b)) +* **api:** OpenAPI spec update via Stainless API ([e91b45b](https://github.com/cloudflare/cloudflare-python/commit/e91b45b7f35070dfbb431b7090fb5bd3b23cf6ff)) +* **api:** OpenAPI spec update via Stainless API ([a2433f4](https://github.com/cloudflare/cloudflare-python/commit/a2433f41c70667e2029dc46fa437fc88634a5ed8)) +* **api:** OpenAPI spec update via Stainless API ([598836d](https://github.com/cloudflare/cloudflare-python/commit/598836dfda80bf10c4ca73b257aeb977eb08bc34)) +* **api:** OpenAPI spec update via Stainless API ([512203e](https://github.com/cloudflare/cloudflare-python/commit/512203e85899be0c4ccc8190541335079b2bdca2)) +* **api:** OpenAPI spec update via Stainless API ([cf3b8d9](https://github.com/cloudflare/cloudflare-python/commit/cf3b8d925d286f7c34aeb01e93c42eb7eabcbe57)) +* **api:** OpenAPI spec update via Stainless API ([cf6bd06](https://github.com/cloudflare/cloudflare-python/commit/cf6bd06c4cf2d58b4ac796653f8dd75390ea068c)) +* **api:** OpenAPI spec update via Stainless API ([ccaeebb](https://github.com/cloudflare/cloudflare-python/commit/ccaeebb547d93eb510b712ef69e34bbd65f5b337)) +* **api:** OpenAPI spec update via Stainless API ([4346909](https://github.com/cloudflare/cloudflare-python/commit/434690974d3bdaaa34565ba7a26bfe750d16cb9b)) +* **api:** OpenAPI spec update via Stainless API ([20e4aff](https://github.com/cloudflare/cloudflare-python/commit/20e4aff929e766d279507d97489f5059d5d2b770)) +* **api:** OpenAPI spec update via Stainless API ([9c895b4](https://github.com/cloudflare/cloudflare-python/commit/9c895b4f42765ea9cc36239c55a3cc3cb59ceac4)) +* **api:** OpenAPI spec update via Stainless API ([90c3186](https://github.com/cloudflare/cloudflare-python/commit/90c31867607cacc0df92c7522cb87ab0cb1cff5f)) +* **api:** OpenAPI spec update via Stainless API ([25951ee](https://github.com/cloudflare/cloudflare-python/commit/25951eeb48ae88ce35f9f86116d3cbacc45bc1b2)) +* **api:** OpenAPI spec update via Stainless API ([ca2bde2](https://github.com/cloudflare/cloudflare-python/commit/ca2bde239b915b466b12771884e89b280dd3065a)) +* **api:** OpenAPI spec update via Stainless API ([c2e0647](https://github.com/cloudflare/cloudflare-python/commit/c2e0647bafd5baa13fdb71f379978e59d38aabbf)) +* **api:** OpenAPI spec update via Stainless API ([74cd67c](https://github.com/cloudflare/cloudflare-python/commit/74cd67c1d52e37daae3c56d32c93a3a4de6365d0)) +* **api:** OpenAPI spec update via Stainless API ([83cd3fd](https://github.com/cloudflare/cloudflare-python/commit/83cd3fdb839de792fe43191b6f5ff9dfff28bd0e)) +* **api:** OpenAPI spec update via Stainless API ([86075bb](https://github.com/cloudflare/cloudflare-python/commit/86075bbe47a78093139791c627604aa58772c1a1)) +* **api:** OpenAPI spec update via Stainless API ([7b4ad6e](https://github.com/cloudflare/cloudflare-python/commit/7b4ad6eb4aaba4f17d146dd848f67d9dcdcba159)) +* **api:** OpenAPI spec update via Stainless API ([11cfe41](https://github.com/cloudflare/cloudflare-python/commit/11cfe41b8e80ae2405fa01ab1d7dd1893f2cbb2c)) +* **api:** OpenAPI spec update via Stainless API ([c3abf89](https://github.com/cloudflare/cloudflare-python/commit/c3abf890c1575e305cb0bfb8db5573f372460526)) +* **api:** OpenAPI spec update via Stainless API ([1729a2c](https://github.com/cloudflare/cloudflare-python/commit/1729a2cdd4171289500c8c335196177e3cd0dcff)) +* **api:** OpenAPI spec update via Stainless API ([2516664](https://github.com/cloudflare/cloudflare-python/commit/25166648100df6ea94d8d7c5ccdddf3354870599)) +* **api:** OpenAPI spec update via Stainless API ([2dce4af](https://github.com/cloudflare/cloudflare-python/commit/2dce4afe424da4476ba095c6d8ae93dc88377b5a)) +* **api:** OpenAPI spec update via Stainless API ([c08fb0d](https://github.com/cloudflare/cloudflare-python/commit/c08fb0db23befef2db80f531c8a12d2f607cb562)) +* **api:** OpenAPI spec update via Stainless API ([2fdfcf5](https://github.com/cloudflare/cloudflare-python/commit/2fdfcf5572dfb167a5292f6dc15ed0eb28ff941a)) +* **api:** OpenAPI spec update via Stainless API ([c94a743](https://github.com/cloudflare/cloudflare-python/commit/c94a7430a205e7d855a63b20b94728f46a97942b)) +* **api:** OpenAPI spec update via Stainless API ([87d6d49](https://github.com/cloudflare/cloudflare-python/commit/87d6d49d65697be7bfb046a3b26f4e765af3e463)) +* **api:** OpenAPI spec update via Stainless API ([7fcc030](https://github.com/cloudflare/cloudflare-python/commit/7fcc030e0b825047f3e9d230b686489e1dd144b0)) +* **api:** OpenAPI spec update via Stainless API ([64a4acd](https://github.com/cloudflare/cloudflare-python/commit/64a4acd3f11453eaf7bd817324f32410c7e2eefc)) +* **api:** OpenAPI spec update via Stainless API ([8607159](https://github.com/cloudflare/cloudflare-python/commit/86071592bef075f2d0934fb87d009a948297fa38)) +* **api:** OpenAPI spec update via Stainless API ([e75f499](https://github.com/cloudflare/cloudflare-python/commit/e75f49950ef8916ae747d51f8811f3e0a4b2a35a)) +* **api:** OpenAPI spec update via Stainless API ([8e5a9db](https://github.com/cloudflare/cloudflare-python/commit/8e5a9db1035e89e25e96023a9a37c673c9f83020)) +* **api:** OpenAPI spec update via Stainless API ([53f952b](https://github.com/cloudflare/cloudflare-python/commit/53f952b0cacf7f2fb3bb07ef3c2244774058f90b)) +* **api:** OpenAPI spec update via Stainless API ([9aae738](https://github.com/cloudflare/cloudflare-python/commit/9aae738690c7f728835e2a883f7cd485582bc0c6)) +* **api:** OpenAPI spec update via Stainless API ([17f284a](https://github.com/cloudflare/cloudflare-python/commit/17f284ac3d485d7e5849225f2a8d03bb951c94e2)) +* **api:** OpenAPI spec update via Stainless API ([1238133](https://github.com/cloudflare/cloudflare-python/commit/12381332af5e19131244ec7de5497afb29925a2c)) +* **api:** OpenAPI spec update via Stainless API ([b80c95a](https://github.com/cloudflare/cloudflare-python/commit/b80c95a5acf45b0a74fdfb079d5b4b2ba29f4889)) +* **api:** OpenAPI spec update via Stainless API ([1cba5a7](https://github.com/cloudflare/cloudflare-python/commit/1cba5a7c0dc808b4c9159441fb8cc92aa2bcbfb4)) +* **api:** OpenAPI spec update via Stainless API ([852b7dc](https://github.com/cloudflare/cloudflare-python/commit/852b7dc358f64d43b4f582c1bdb419982297d381)) +* **api:** OpenAPI spec update via Stainless API ([cf7cc16](https://github.com/cloudflare/cloudflare-python/commit/cf7cc163606391bd6f31a63fba6b9a35886e3655)) +* **api:** OpenAPI spec update via Stainless API ([009cfad](https://github.com/cloudflare/cloudflare-python/commit/009cfadeaadda6369a5a54b411ad49eb1c8080e6)) +* **api:** OpenAPI spec update via Stainless API ([cfa4415](https://github.com/cloudflare/cloudflare-python/commit/cfa44153bb98e1d5de4f6c5b40e829393dcc0fee)) +* **api:** OpenAPI spec update via Stainless API ([c174dc7](https://github.com/cloudflare/cloudflare-python/commit/c174dc7973c277aa6311f8abf57c82029171b05a)) +* **api:** OpenAPI spec update via Stainless API ([89d49a9](https://github.com/cloudflare/cloudflare-python/commit/89d49a90268b05872114ca2e5d36b57478033aae)) +* **api:** OpenAPI spec update via Stainless API ([f60b165](https://github.com/cloudflare/cloudflare-python/commit/f60b1656d2761b02fe3c83ee06b055ec37a2bb28)) +* **api:** OpenAPI spec update via Stainless API ([93bdfad](https://github.com/cloudflare/cloudflare-python/commit/93bdfad87e3d6384d300305293eb2a2338c2bcb1)) +* **api:** OpenAPI spec update via Stainless API ([8110894](https://github.com/cloudflare/cloudflare-python/commit/8110894e0b2ab5cce47c00a6abbb88921deb3836)) +* **api:** OpenAPI spec update via Stainless API ([74958bd](https://github.com/cloudflare/cloudflare-python/commit/74958bdef6ca704ccb6a6f526ec6f94013f29240)) +* **api:** OpenAPI spec update via Stainless API ([fba0e37](https://github.com/cloudflare/cloudflare-python/commit/fba0e374dce1386b26e218a688de14356e75f6d2)) +* **api:** OpenAPI spec update via Stainless API ([23722cc](https://github.com/cloudflare/cloudflare-python/commit/23722cc37209e138c5d791194c336a9f104616f6)) +* **api:** OpenAPI spec update via Stainless API ([8236e8b](https://github.com/cloudflare/cloudflare-python/commit/8236e8bf6764880e4347bc855d5e26ce1b506f63)) +* **api:** OpenAPI spec update via Stainless API ([5cf1dde](https://github.com/cloudflare/cloudflare-python/commit/5cf1ddeaa0181abab3c87e5d5bf19d92232c065b)) +* **api:** OpenAPI spec update via Stainless API ([a8cad59](https://github.com/cloudflare/cloudflare-python/commit/a8cad592935bbd685e0f504573cf7c8fb191951c)) +* **api:** OpenAPI spec update via Stainless API ([6134898](https://github.com/cloudflare/cloudflare-python/commit/6134898fdd4e64d8b2c30122c45fe7e2f2793523)) +* **api:** OpenAPI spec update via Stainless API ([d1df920](https://github.com/cloudflare/cloudflare-python/commit/d1df920f4ba8d8e8557acf250995a7f635487fd7)) +* **api:** OpenAPI spec update via Stainless API ([03f1cd5](https://github.com/cloudflare/cloudflare-python/commit/03f1cd5d2303dfbfa7460086b8d027063b05aa09)) +* **api:** OpenAPI spec update via Stainless API ([6fa0258](https://github.com/cloudflare/cloudflare-python/commit/6fa02583cb95bd6797de771dc7ac82ecd022c75a)) +* **api:** OpenAPI spec update via Stainless API ([bacd1bf](https://github.com/cloudflare/cloudflare-python/commit/bacd1bf46e8cf159240a1cd3590163f0858c6151)) +* **api:** OpenAPI spec update via Stainless API ([3ada1c7](https://github.com/cloudflare/cloudflare-python/commit/3ada1c7b2e2b51847586471734d036cabaac9837)) +* **api:** OpenAPI spec update via Stainless API ([fe70845](https://github.com/cloudflare/cloudflare-python/commit/fe708458268bd1167e770658ccb1a4a1bb5078f8)) +* **api:** OpenAPI spec update via Stainless API ([040b023](https://github.com/cloudflare/cloudflare-python/commit/040b023072f9b261933e0ec719fe540def306324)) +* **api:** OpenAPI spec update via Stainless API ([7e83029](https://github.com/cloudflare/cloudflare-python/commit/7e830293c537f6732dae17e45738061f705749cf)) +* **api:** OpenAPI spec update via Stainless API ([c5a2737](https://github.com/cloudflare/cloudflare-python/commit/c5a273734ac08b4144c3f3cf6491f8241e4ac4ba)) +* **api:** OpenAPI spec update via Stainless API ([2eb03dd](https://github.com/cloudflare/cloudflare-python/commit/2eb03dd982a840ccfbc411f4074b592ed453455d)) +* **api:** OpenAPI spec update via Stainless API ([0ce4b26](https://github.com/cloudflare/cloudflare-python/commit/0ce4b26ad021bef18defee002e53c9a6772d44b1)) +* **api:** OpenAPI spec update via Stainless API ([d91fe49](https://github.com/cloudflare/cloudflare-python/commit/d91fe49512b9fbaef063537ac83e046abdab9321)) +* **api:** OpenAPI spec update via Stainless API ([6995660](https://github.com/cloudflare/cloudflare-python/commit/69956609dd8e4d3b49f12d26f281732d094da463)) +* **api:** OpenAPI spec update via Stainless API ([3a7046c](https://github.com/cloudflare/cloudflare-python/commit/3a7046c27a857c08af086cc6decd77e16e5b728d)) +* **api:** OpenAPI spec update via Stainless API ([67e6f18](https://github.com/cloudflare/cloudflare-python/commit/67e6f18c0d39967f2dfb019c8d4304efffad9da3)) +* **api:** OpenAPI spec update via Stainless API ([04048c5](https://github.com/cloudflare/cloudflare-python/commit/04048c52c00d1c4c1838c67c6fd141adaa5f5d31)) +* **api:** OpenAPI spec update via Stainless API ([e9ed855](https://github.com/cloudflare/cloudflare-python/commit/e9ed855708d7d4bd33671b789075a7f762091fa6)) +* **api:** OpenAPI spec update via Stainless API ([befbb9c](https://github.com/cloudflare/cloudflare-python/commit/befbb9c64aedc39c185eb7cb360177633f1632f4)) +* **api:** OpenAPI spec update via Stainless API ([2294aab](https://github.com/cloudflare/cloudflare-python/commit/2294aabf9704cff988b7f3ae914276a1957e0ee8)) +* **api:** OpenAPI spec update via Stainless API ([eaa8e72](https://github.com/cloudflare/cloudflare-python/commit/eaa8e7251d7e8e0ef28440c93e0b9f395e89a208)) +* **api:** OpenAPI spec update via Stainless API ([2d1fd82](https://github.com/cloudflare/cloudflare-python/commit/2d1fd82a25085ec8af0f15159219499f3a777512)) +* **api:** OpenAPI spec update via Stainless API ([b7bf288](https://github.com/cloudflare/cloudflare-python/commit/b7bf288769f4e9711f109cab5b231cf97ee436b3)) +* **api:** OpenAPI spec update via Stainless API ([46698df](https://github.com/cloudflare/cloudflare-python/commit/46698df8041fa91f1d7dc1cf66ee6b34c5e5550d)) +* **api:** OpenAPI spec update via Stainless API ([58191cb](https://github.com/cloudflare/cloudflare-python/commit/58191cba252056dc906a63d41bf99388919d9b91)) +* **api:** OpenAPI spec update via Stainless API ([e0c241a](https://github.com/cloudflare/cloudflare-python/commit/e0c241ae0c09686f564fae01f23f03fbeb091ae0)) +* **api:** OpenAPI spec update via Stainless API ([5baa2fc](https://github.com/cloudflare/cloudflare-python/commit/5baa2fc8fd2c2c433389e78d59d5b0904ee92652)) +* **api:** OpenAPI spec update via Stainless API ([80601e2](https://github.com/cloudflare/cloudflare-python/commit/80601e266d77d18e058e0b251bf24eb8139d73e1)) +* **api:** OpenAPI spec update via Stainless API ([68138db](https://github.com/cloudflare/cloudflare-python/commit/68138db1b04b75f831ceb188ebe3e91e805c6615)) +* **api:** OpenAPI spec update via Stainless API ([25ddd22](https://github.com/cloudflare/cloudflare-python/commit/25ddd22e8ebc516a280afd656bea3338de60b92c)) +* **api:** OpenAPI spec update via Stainless API ([06a3d17](https://github.com/cloudflare/cloudflare-python/commit/06a3d17164bbb3bbde5f6c34fe50a9c1f6487c46)) +* **api:** OpenAPI spec update via Stainless API ([ec24a52](https://github.com/cloudflare/cloudflare-python/commit/ec24a52f7f0dc3f0eea7ae905dcffa0aada85366)) +* **api:** OpenAPI spec update via Stainless API ([15aabc4](https://github.com/cloudflare/cloudflare-python/commit/15aabc46d6cdce0e93ef9a52ed8acb644a1a21b4)) +* **api:** OpenAPI spec update via Stainless API ([c723bde](https://github.com/cloudflare/cloudflare-python/commit/c723bde8ca43b8c64a78700ffafd208d12ac5967)) +* **api:** OpenAPI spec update via Stainless API ([d8f38c6](https://github.com/cloudflare/cloudflare-python/commit/d8f38c68efbc4b1cf8b9f80e81f32adf971ab56b)) +* **api:** OpenAPI spec update via Stainless API ([915c1d7](https://github.com/cloudflare/cloudflare-python/commit/915c1d761dde3485d3aca5f4b3ddb530a15a25ee)) +* **api:** OpenAPI spec update via Stainless API ([2842572](https://github.com/cloudflare/cloudflare-python/commit/284257253d7f203f4483c1a4e555879e92c77751)) +* **api:** OpenAPI spec update via Stainless API ([da4b888](https://github.com/cloudflare/cloudflare-python/commit/da4b88885af11c8cdaa24f6df47f62474af6472b)) +* **api:** OpenAPI spec update via Stainless API ([cd05b30](https://github.com/cloudflare/cloudflare-python/commit/cd05b30c88c7c4950159a0d1c35ea41787e89b8b)) +* **api:** OpenAPI spec update via Stainless API ([0c67313](https://github.com/cloudflare/cloudflare-python/commit/0c67313053090532785b8df4be37150d586ef25e)) +* **api:** OpenAPI spec update via Stainless API ([2c0ff7d](https://github.com/cloudflare/cloudflare-python/commit/2c0ff7dee26669a155639a3cc9b68de1e6592ddb)) +* **api:** OpenAPI spec update via Stainless API ([61f2012](https://github.com/cloudflare/cloudflare-python/commit/61f20128d4257abc0216c14cc39781116addeaac)) +* **api:** OpenAPI spec update via Stainless API ([a72ac5b](https://github.com/cloudflare/cloudflare-python/commit/a72ac5b5a6fbbdb1a2345f6199a68755fa1f87fc)) +* **api:** OpenAPI spec update via Stainless API ([f4ca9d1](https://github.com/cloudflare/cloudflare-python/commit/f4ca9d12410b0fba30b69bbbba811ba60b9967e7)) +* **api:** OpenAPI spec update via Stainless API ([2bad5b9](https://github.com/cloudflare/cloudflare-python/commit/2bad5b93a901a1ee89b35891e05d7bbf05d1589e)) +* **api:** OpenAPI spec update via Stainless API ([5825940](https://github.com/cloudflare/cloudflare-python/commit/582594017ebd9426b7d7c64e258bff1835ead53c)) +* **api:** OpenAPI spec update via Stainless API ([9bc3a45](https://github.com/cloudflare/cloudflare-python/commit/9bc3a4555aabcf97d43435d75f355de45e96e168)) +* **api:** OpenAPI spec update via Stainless API ([0575db6](https://github.com/cloudflare/cloudflare-python/commit/0575db6f08ac4c85283eedd75d1038e09e084e59)) +* **api:** OpenAPI spec update via Stainless API ([81164f1](https://github.com/cloudflare/cloudflare-python/commit/81164f1641408ec586c6f93b01b72702a4288f11)) +* **api:** OpenAPI spec update via Stainless API ([82449b1](https://github.com/cloudflare/cloudflare-python/commit/82449b15512f4926d4c125fdfeaf48829cf0ba3f)) +* **api:** OpenAPI spec update via Stainless API ([d56dc7a](https://github.com/cloudflare/cloudflare-python/commit/d56dc7a474b8e2ae1d475bbfecb84d0f613afdd4)) +* **api:** OpenAPI spec update via Stainless API ([ef6f32c](https://github.com/cloudflare/cloudflare-python/commit/ef6f32cf5d3936c61de034445acb08661f2ffdfa)) +* **api:** OpenAPI spec update via Stainless API ([e14765e](https://github.com/cloudflare/cloudflare-python/commit/e14765ee80efb3ba48a30152cc11e7ea05957995)) +* **api:** OpenAPI spec update via Stainless API ([b37a4a9](https://github.com/cloudflare/cloudflare-python/commit/b37a4a952c5d474c52d80c86e95232c843c8c4ff)) +* **api:** OpenAPI spec update via Stainless API ([b4c773e](https://github.com/cloudflare/cloudflare-python/commit/b4c773eca520228865aff15b602889f233db07a3)) +* **api:** OpenAPI spec update via Stainless API ([8d53838](https://github.com/cloudflare/cloudflare-python/commit/8d53838110ffb81f9df3a9ff2c077bf40bce3803)) +* **api:** OpenAPI spec update via Stainless API ([a9193f3](https://github.com/cloudflare/cloudflare-python/commit/a9193f3efd37c3ba952f5fc1bd9716109a2f6038)) +* **api:** OpenAPI spec update via Stainless API ([114bb6b](https://github.com/cloudflare/cloudflare-python/commit/114bb6b322e7fdd0481be424dea91fa9f13c1221)) +* **api:** OpenAPI spec update via Stainless API ([b39b42a](https://github.com/cloudflare/cloudflare-python/commit/b39b42a37f4e218c0c5b82cb99ef848e77d50972)) +* **api:** OpenAPI spec update via Stainless API ([070918f](https://github.com/cloudflare/cloudflare-python/commit/070918f0d2abab1766b0d0a0b12cc3a2f738922f)) +* **api:** OpenAPI spec update via Stainless API ([a138322](https://github.com/cloudflare/cloudflare-python/commit/a138322698b7398a94541bf47ef931088a54a63c)) +* **api:** OpenAPI spec update via Stainless API ([ed59500](https://github.com/cloudflare/cloudflare-python/commit/ed595005439f2820450795575b37f5a9fafaf1ae)) +* **api:** OpenAPI spec update via Stainless API ([15ad935](https://github.com/cloudflare/cloudflare-python/commit/15ad9355e6cb8a6171954a4c3660dc45bbde134d)) +* **api:** OpenAPI spec update via Stainless API ([15ef09d](https://github.com/cloudflare/cloudflare-python/commit/15ef09d211715e102a7230463291f842c86c455d)) +* **api:** OpenAPI spec update via Stainless API ([647cd3e](https://github.com/cloudflare/cloudflare-python/commit/647cd3ebbcb92abd2bd19a3c845d9ad3f1da86b2)) +* **api:** OpenAPI spec update via Stainless API ([65df83b](https://github.com/cloudflare/cloudflare-python/commit/65df83ba6d8e81fb1c8285548952ec522a76fbfb)) +* **api:** OpenAPI spec update via Stainless API ([bb11a58](https://github.com/cloudflare/cloudflare-python/commit/bb11a58e22404b7901bf03be2c0abeb78d15ddd3)) +* **api:** OpenAPI spec update via Stainless API ([0354780](https://github.com/cloudflare/cloudflare-python/commit/03547804fcf6ef2ec07093dbcadf81be21db528e)) +* **api:** OpenAPI spec update via Stainless API ([8116c69](https://github.com/cloudflare/cloudflare-python/commit/8116c69364aefac196fc53103868d3830dc3ee74)) +* **api:** OpenAPI spec update via Stainless API ([f81ecdd](https://github.com/cloudflare/cloudflare-python/commit/f81ecdddbe0e69bc001dde77b5766a6d84ec337a)) +* **api:** OpenAPI spec update via Stainless API ([da7d675](https://github.com/cloudflare/cloudflare-python/commit/da7d67586ad2cc617d3f2e67f0e68e6669571330)) +* **api:** OpenAPI spec update via Stainless API ([4a1eec8](https://github.com/cloudflare/cloudflare-python/commit/4a1eec886c9d1117dda13769dc34450101aaef79)) +* **api:** OpenAPI spec update via Stainless API ([bb2a07e](https://github.com/cloudflare/cloudflare-python/commit/bb2a07e35bb62f7778af00a539c45b100250b9ab)) +* **api:** OpenAPI spec update via Stainless API ([b8411a9](https://github.com/cloudflare/cloudflare-python/commit/b8411a93631256d3e60260fb1d085b5a2fc61059)) +* **api:** OpenAPI spec update via Stainless API ([f4d0dc7](https://github.com/cloudflare/cloudflare-python/commit/f4d0dc713833de606438f5b991c5217919c8858c)) +* **api:** OpenAPI spec update via Stainless API ([491a775](https://github.com/cloudflare/cloudflare-python/commit/491a77520bc9c998b2ebf235fcef1d493259bfbd)) +* **api:** OpenAPI spec update via Stainless API ([dced7fc](https://github.com/cloudflare/cloudflare-python/commit/dced7fcf3365bff044541ba43d2d1909f3093483)) +* **api:** OpenAPI spec update via Stainless API ([6a16a58](https://github.com/cloudflare/cloudflare-python/commit/6a16a5856041fc52cad561b36c6757a5fb229b60)) +* **api:** OpenAPI spec update via Stainless API ([e3a3b62](https://github.com/cloudflare/cloudflare-python/commit/e3a3b6208066f7b58700c4007300a92d337e744d)) +* **api:** OpenAPI spec update via Stainless API ([aaa21da](https://github.com/cloudflare/cloudflare-python/commit/aaa21da3219f12a4be884547b5ab81a2fd1bfbac)) +* **api:** OpenAPI spec update via Stainless API ([d5bb6f8](https://github.com/cloudflare/cloudflare-python/commit/d5bb6f83628aabfcd1db493fcc6eb76e22de5f68)) +* **api:** OpenAPI spec update via Stainless API ([9de375b](https://github.com/cloudflare/cloudflare-python/commit/9de375beef2488972cacd318bfd27a49f3973e02)) +* **api:** OpenAPI spec update via Stainless API ([1865527](https://github.com/cloudflare/cloudflare-python/commit/18655278398f9763c94a71cdfe9313bc6b0a5abc)) +* **api:** OpenAPI spec update via Stainless API ([688c4f0](https://github.com/cloudflare/cloudflare-python/commit/688c4f037826f4300d8be2c7a770daa33bfdd2f4)) +* **api:** OpenAPI spec update via Stainless API ([8176af1](https://github.com/cloudflare/cloudflare-python/commit/8176af1d6cde5c1cde27a48f135cdd3d91f955d2)) +* **api:** OpenAPI spec update via Stainless API ([6e6f0e3](https://github.com/cloudflare/cloudflare-python/commit/6e6f0e325b4234ff4b84f86f6a2af2c9a7727b31)) +* **api:** OpenAPI spec update via Stainless API ([b4e9e71](https://github.com/cloudflare/cloudflare-python/commit/b4e9e71ad85e18a3aacdcd1afdfa481ce63fad20)) +* **api:** OpenAPI spec update via Stainless API ([bfd6950](https://github.com/cloudflare/cloudflare-python/commit/bfd6950cfc776a23d60f7bca40667b41bf235e2b)) +* **api:** OpenAPI spec update via Stainless API ([c32f164](https://github.com/cloudflare/cloudflare-python/commit/c32f16418b56b29a1a21896930423b0a9de31e89)) +* **api:** OpenAPI spec update via Stainless API ([ff6a875](https://github.com/cloudflare/cloudflare-python/commit/ff6a8754280633d21d15f55861adc4cea3d8708c)) +* **api:** OpenAPI spec update via Stainless API ([8b94b8d](https://github.com/cloudflare/cloudflare-python/commit/8b94b8dd763f1c4688ad27e6a36c138e6cf27052)) +* **api:** OpenAPI spec update via Stainless API ([4f48f34](https://github.com/cloudflare/cloudflare-python/commit/4f48f341129c396bdc50dafe7bc6781f6b077877)) +* **api:** OpenAPI spec update via Stainless API ([32a6d2d](https://github.com/cloudflare/cloudflare-python/commit/32a6d2dcd9e3381c3d3e0c345e377f82a46f5352)) +* **api:** OpenAPI spec update via Stainless API ([3339305](https://github.com/cloudflare/cloudflare-python/commit/33393052922c358ff090b879c254539d6479f9b7)) +* **api:** OpenAPI spec update via Stainless API ([e7ece70](https://github.com/cloudflare/cloudflare-python/commit/e7ece7099ae716de17b421d5b9905fe52b19dc80)) +* **api:** OpenAPI spec update via Stainless API ([f621e07](https://github.com/cloudflare/cloudflare-python/commit/f621e070f2e3ad28b0770aebd595ff65ad445089)) +* **api:** OpenAPI spec update via Stainless API ([c4ec251](https://github.com/cloudflare/cloudflare-python/commit/c4ec2518e7031bc83aa21508f647f104424da4ce)) +* **api:** OpenAPI spec update via Stainless API ([f3d27bd](https://github.com/cloudflare/cloudflare-python/commit/f3d27bd774f90ae72b41547f7db2487ada600973)) +* **api:** OpenAPI spec update via Stainless API ([398428c](https://github.com/cloudflare/cloudflare-python/commit/398428cde69f0953309c5142d56949cc55b5f3a1)) +* **api:** OpenAPI spec update via Stainless API ([cf5b13e](https://github.com/cloudflare/cloudflare-python/commit/cf5b13e5271c63012a21520dc168ed64a1696225)) +* **api:** OpenAPI spec update via Stainless API ([9e8d867](https://github.com/cloudflare/cloudflare-python/commit/9e8d867e3e9c4043366b0934900b96d63aedd83a)) +* **api:** OpenAPI spec update via Stainless API ([2ebf3ae](https://github.com/cloudflare/cloudflare-python/commit/2ebf3aedd935784cbd7463980ce8b19400136d14)) +* **api:** OpenAPI spec update via Stainless API ([be954f1](https://github.com/cloudflare/cloudflare-python/commit/be954f1f8df7965f71180d994464286455dff31e)) +* **api:** OpenAPI spec update via Stainless API ([209d91d](https://github.com/cloudflare/cloudflare-python/commit/209d91db43837a3bc759fa6ba0f6ad03e7bd1c22)) +* **api:** OpenAPI spec update via Stainless API ([0648b00](https://github.com/cloudflare/cloudflare-python/commit/0648b00bc8893394882a6198a86f2775aeffa265)) +* **api:** OpenAPI spec update via Stainless API ([8728546](https://github.com/cloudflare/cloudflare-python/commit/87285467021bc607827c284359a09900592417ec)) +* **api:** OpenAPI spec update via Stainless API ([d086f8e](https://github.com/cloudflare/cloudflare-python/commit/d086f8e4065dedb7117027d5d1dab45b08d8b83f)) +* **api:** OpenAPI spec update via Stainless API ([b4ccd6a](https://github.com/cloudflare/cloudflare-python/commit/b4ccd6ae626bd333ba9a29476c54f2c49f5871c8)) +* **api:** OpenAPI spec update via Stainless API ([b3aea3b](https://github.com/cloudflare/cloudflare-python/commit/b3aea3b33e283f9bfc69f15f583d3ca91f9c1c16)) +* **api:** OpenAPI spec update via Stainless API ([22b306f](https://github.com/cloudflare/cloudflare-python/commit/22b306f9f32baeb01fc591bab5e7eb055b8f7866)) +* **api:** OpenAPI spec update via Stainless API ([6474698](https://github.com/cloudflare/cloudflare-python/commit/64746987f3b1d510fdb01d0224a06d22c90de7fb)) +* **api:** OpenAPI spec update via Stainless API ([2adff4f](https://github.com/cloudflare/cloudflare-python/commit/2adff4fa8c4a1d2d16f79b4942344cdf0bb14365)) +* **api:** OpenAPI spec update via Stainless API ([6599b89](https://github.com/cloudflare/cloudflare-python/commit/6599b894084c7049ad8bd2990c32e5ba6064d896)) +* **api:** OpenAPI spec update via Stainless API ([ca8df49](https://github.com/cloudflare/cloudflare-python/commit/ca8df49cac11b03f631243f2b5bc61033260d72b)) +* **api:** OpenAPI spec update via Stainless API ([811809e](https://github.com/cloudflare/cloudflare-python/commit/811809ea7819adb8ac0d7193d8381804b7414780)) +* **api:** OpenAPI spec update via Stainless API ([5417100](https://github.com/cloudflare/cloudflare-python/commit/541710005f476704c47c3521d248003fc9779029)) +* **api:** OpenAPI spec update via Stainless API ([b8641ba](https://github.com/cloudflare/cloudflare-python/commit/b8641babb0bdfe6fe7a95a9e483dfd92c44ec77f)) +* **api:** OpenAPI spec update via Stainless API ([85ea74c](https://github.com/cloudflare/cloudflare-python/commit/85ea74c4a37b5194290c8209516a362b59750cb4)) +* **api:** OpenAPI spec update via Stainless API ([3f6b017](https://github.com/cloudflare/cloudflare-python/commit/3f6b0175cfdcdc991232c1a42361ef7d2873a7d4)) +* **api:** OpenAPI spec update via Stainless API ([99bcb73](https://github.com/cloudflare/cloudflare-python/commit/99bcb73398dfc64dfa6f5983de458835156e2b92)) +* **api:** OpenAPI spec update via Stainless API ([98d6d68](https://github.com/cloudflare/cloudflare-python/commit/98d6d681f0ad9668ce3fdedd534fbf1ba8f8507d)) +* **api:** OpenAPI spec update via Stainless API ([878b526](https://github.com/cloudflare/cloudflare-python/commit/878b526a9d376b2a3fceaefc7223388436f8c31c)) +* **api:** OpenAPI spec update via Stainless API ([52fcb9b](https://github.com/cloudflare/cloudflare-python/commit/52fcb9bf6988bd59bed933efd942ac8a35825fb9)) +* **api:** OpenAPI spec update via Stainless API ([24610ee](https://github.com/cloudflare/cloudflare-python/commit/24610ee1243535917235fe9ba04c3e80580c1c1c)) +* **api:** OpenAPI spec update via Stainless API ([1de091b](https://github.com/cloudflare/cloudflare-python/commit/1de091bc1ba4baf0e2bea21d0f2222a89c4edf69)) +* **api:** OpenAPI spec update via Stainless API ([a1855ad](https://github.com/cloudflare/cloudflare-python/commit/a1855ad6ee34f84f89450f911184b6f7eed4413d)) +* **api:** OpenAPI spec update via Stainless API ([c540a6b](https://github.com/cloudflare/cloudflare-python/commit/c540a6bc15c3853b7c24cf7ab0b76442ccdbe2b5)) +* **api:** OpenAPI spec update via Stainless API ([46fe427](https://github.com/cloudflare/cloudflare-python/commit/46fe427595b0c1580dfe6918782883cb8aa60007)) +* **api:** OpenAPI spec update via Stainless API ([6b898d6](https://github.com/cloudflare/cloudflare-python/commit/6b898d6f100b09f5f2366aa80ef9aba6d908f916)) +* **api:** OpenAPI spec update via Stainless API ([2a1cb4b](https://github.com/cloudflare/cloudflare-python/commit/2a1cb4b5eebeeaa93b5001123a694925e76fbd87)) +* **api:** OpenAPI spec update via Stainless API ([f44b8d9](https://github.com/cloudflare/cloudflare-python/commit/f44b8d9ac90e52945dccdd5daf59db6d6fa8adc0)) +* **api:** OpenAPI spec update via Stainless API ([e8f0de5](https://github.com/cloudflare/cloudflare-python/commit/e8f0de59269f9b97a1b55a70cffeac08b6f8e86f)) +* **api:** OpenAPI spec update via Stainless API ([bbc84f8](https://github.com/cloudflare/cloudflare-python/commit/bbc84f8a0376b069b8518941feca9f7fd9d94a66)) +* **api:** OpenAPI spec update via Stainless API ([e54a57e](https://github.com/cloudflare/cloudflare-python/commit/e54a57e258d36ed6b1054af8e90637c6aa66be0d)) +* **api:** OpenAPI spec update via Stainless API ([96735b7](https://github.com/cloudflare/cloudflare-python/commit/96735b72824d5e8e23c4806bed46dde469caa036)) +* **api:** OpenAPI spec update via Stainless API ([bc04ae8](https://github.com/cloudflare/cloudflare-python/commit/bc04ae8b528ec86c035981138e99ea648cfb5290)) +* **api:** OpenAPI spec update via Stainless API ([1273d3f](https://github.com/cloudflare/cloudflare-python/commit/1273d3fcc43ab553dc5224195a446a7d9bef6c81)) +* **api:** OpenAPI spec update via Stainless API ([291e099](https://github.com/cloudflare/cloudflare-python/commit/291e099c3e37e5db5143c3aae020326a24385de8)) +* **api:** OpenAPI spec update via Stainless API ([258cab1](https://github.com/cloudflare/cloudflare-python/commit/258cab107d7116f1dabd7fc7d97e9074a8ab9d90)) +* **api:** OpenAPI spec update via Stainless API ([c4770ee](https://github.com/cloudflare/cloudflare-python/commit/c4770ee743c448a7bb8a3dabbc24f6354144d225)) +* **api:** OpenAPI spec update via Stainless API ([a511f0e](https://github.com/cloudflare/cloudflare-python/commit/a511f0e2cbb2a61e96f3cb589415fe80a9704434)) +* **api:** OpenAPI spec update via Stainless API ([af263ca](https://github.com/cloudflare/cloudflare-python/commit/af263cad7303d31ac949456b5505d0c8b52f09e4)) +* **api:** OpenAPI spec update via Stainless API ([d2e2b28](https://github.com/cloudflare/cloudflare-python/commit/d2e2b28b9866b565cd6886de51c1e1dd822a1d01)) +* **api:** OpenAPI spec update via Stainless API ([821bb59](https://github.com/cloudflare/cloudflare-python/commit/821bb593a9de0164e50d82333139ae710d5335ea)) +* **api:** OpenAPI spec update via Stainless API ([e78475a](https://github.com/cloudflare/cloudflare-python/commit/e78475a10ec7076dc4f2aa17ee022474ae2adf23)) +* **api:** OpenAPI spec update via Stainless API ([b6be122](https://github.com/cloudflare/cloudflare-python/commit/b6be1224977894d2e22f15a2351d32ab762c92a8)) +* **api:** OpenAPI spec update via Stainless API ([3995ced](https://github.com/cloudflare/cloudflare-python/commit/3995ced50250d1c2064d211d417646b96412dfd0)) +* **api:** OpenAPI spec update via Stainless API ([2f1d0e0](https://github.com/cloudflare/cloudflare-python/commit/2f1d0e0668fbb75bf7bc2f8b0b9352a344282a52)) +* **api:** OpenAPI spec update via Stainless API ([75500a8](https://github.com/cloudflare/cloudflare-python/commit/75500a82528ea4719f465ea829d5859bd6cd7753)) +* **api:** OpenAPI spec update via Stainless API ([8fb0b19](https://github.com/cloudflare/cloudflare-python/commit/8fb0b193fc2229cedddaa58788bc99266e08b2bf)) +* **api:** OpenAPI spec update via Stainless API ([522bc46](https://github.com/cloudflare/cloudflare-python/commit/522bc467ebdd2dbcacb8bfce715df6395c9cd8e8)) +* **api:** OpenAPI spec update via Stainless API ([8a429e3](https://github.com/cloudflare/cloudflare-python/commit/8a429e35b8473e54ea071bd28394d946069451fc)) +* **api:** OpenAPI spec update via Stainless API ([38feb38](https://github.com/cloudflare/cloudflare-python/commit/38feb387f4ae465c94934daf211a0f4ea365653e)) +* **api:** OpenAPI spec update via Stainless API ([3c4078f](https://github.com/cloudflare/cloudflare-python/commit/3c4078f9df62341cb4eb203db869e7e14a15a43f)) +* **api:** OpenAPI spec update via Stainless API ([60f53e5](https://github.com/cloudflare/cloudflare-python/commit/60f53e5336ccba89198c2b82ed0783b658903f78)) +* **api:** OpenAPI spec update via Stainless API ([1282d20](https://github.com/cloudflare/cloudflare-python/commit/1282d2095fc72b2a0d9a89109ad61826229bad92)) +* **api:** OpenAPI spec update via Stainless API ([1551969](https://github.com/cloudflare/cloudflare-python/commit/1551969f22447c6c58eb751601e585361585a393)) +* **api:** OpenAPI spec update via Stainless API ([a90da01](https://github.com/cloudflare/cloudflare-python/commit/a90da01d76b191ca8db4864f41f1161c6a418ea9)) +* **api:** OpenAPI spec update via Stainless API ([17c6455](https://github.com/cloudflare/cloudflare-python/commit/17c6455a40f4ca9030d05229b31d3f72ed9b03f7)) +* **api:** OpenAPI spec update via Stainless API ([f7a6ca1](https://github.com/cloudflare/cloudflare-python/commit/f7a6ca119d87ca95d169ea216086a162486e2d58)) +* **api:** OpenAPI spec update via Stainless API ([34706fd](https://github.com/cloudflare/cloudflare-python/commit/34706fdbe82f48e7d8465bd7ce0214b87dea5e41)) +* **api:** OpenAPI spec update via Stainless API ([9094b4e](https://github.com/cloudflare/cloudflare-python/commit/9094b4e4b237a6b0576810f33fe0067a9f0945b8)) +* **api:** OpenAPI spec update via Stainless API ([4a0644f](https://github.com/cloudflare/cloudflare-python/commit/4a0644f309e82a517c9f28f770b13392736fc4b2)) +* **api:** OpenAPI spec update via Stainless API ([17c2b78](https://github.com/cloudflare/cloudflare-python/commit/17c2b78eab91e1e0bb5cefcae5108861dc112cec)) +* **api:** OpenAPI spec update via Stainless API ([5584fca](https://github.com/cloudflare/cloudflare-python/commit/5584fca47ee8029453960542574421c2bfe1f713)) +* **api:** OpenAPI spec update via Stainless API ([6c8b53a](https://github.com/cloudflare/cloudflare-python/commit/6c8b53a499c856886e6eda6db3c1f22e6969e966)) +* **api:** OpenAPI spec update via Stainless API ([0dbf0f5](https://github.com/cloudflare/cloudflare-python/commit/0dbf0f5382d744ac2eff3ca183d31ba1e331cd8f)) +* **api:** OpenAPI spec update via Stainless API ([6949c20](https://github.com/cloudflare/cloudflare-python/commit/6949c20c1eaf29453ffc04182c116f58918ac01d)) +* **api:** OpenAPI spec update via Stainless API ([eba86e8](https://github.com/cloudflare/cloudflare-python/commit/eba86e853d1dae984993f2538d3dac1650390dae)) +* **api:** OpenAPI spec update via Stainless API ([f43166b](https://github.com/cloudflare/cloudflare-python/commit/f43166b9914feba22ea46f44f9d12900992c4798)) +* **api:** OpenAPI spec update via Stainless API ([ee81fba](https://github.com/cloudflare/cloudflare-python/commit/ee81fba8a8ca57e53dda82d3bfdb4492707e4ba6)) +* **api:** OpenAPI spec update via Stainless API ([a897b66](https://github.com/cloudflare/cloudflare-python/commit/a897b665cfbbd37d57e62eaa791d2a91e8a45559)) +* **api:** OpenAPI spec update via Stainless API ([ffc17e9](https://github.com/cloudflare/cloudflare-python/commit/ffc17e958c1c3601f1c70a18021283bf37225948)) +* **api:** OpenAPI spec update via Stainless API ([aeaa56c](https://github.com/cloudflare/cloudflare-python/commit/aeaa56cf6fcba32181047a63b209cfb61b8f5a3b)) +* **api:** OpenAPI spec update via Stainless API ([64819e5](https://github.com/cloudflare/cloudflare-python/commit/64819e531dd5134571a0b55ed963dfa3d1a9cc77)) +* **api:** OpenAPI spec update via Stainless API ([9ec6e88](https://github.com/cloudflare/cloudflare-python/commit/9ec6e8880449858c46ffa8b962d33108aa7ac69d)) +* **api:** OpenAPI spec update via Stainless API ([8f24c0d](https://github.com/cloudflare/cloudflare-python/commit/8f24c0d53839d2601d4e1bd52d7617f58086926c)) +* **api:** OpenAPI spec update via Stainless API ([9a14329](https://github.com/cloudflare/cloudflare-python/commit/9a143298564b586a3655a15249fb6198c72d29ea)) +* **api:** OpenAPI spec update via Stainless API ([6e0e19f](https://github.com/cloudflare/cloudflare-python/commit/6e0e19f4f078d3dd11872cb41177686526f442fb)) +* **api:** OpenAPI spec update via Stainless API ([21c0d21](https://github.com/cloudflare/cloudflare-python/commit/21c0d21b766566cdb99a2b260a71f7ee19dd610f)) +* **api:** OpenAPI spec update via Stainless API ([d064f1a](https://github.com/cloudflare/cloudflare-python/commit/d064f1a0f41bc13e123b30f96d18450c592cccf5)) +* **api:** OpenAPI spec update via Stainless API ([d666576](https://github.com/cloudflare/cloudflare-python/commit/d666576e60ec7a24ceb89aa0280b1c91de1aea03)) +* **api:** OpenAPI spec update via Stainless API ([634a302](https://github.com/cloudflare/cloudflare-python/commit/634a302bfc49250984f90381f9e1a4998031cfa4)) +* **api:** OpenAPI spec update via Stainless API ([aa12f3c](https://github.com/cloudflare/cloudflare-python/commit/aa12f3c9b2b094e7be72997ebc8dfe103117af4d)) +* **api:** OpenAPI spec update via Stainless API ([0559f40](https://github.com/cloudflare/cloudflare-python/commit/0559f4076e51d9f25526c0e1d8394c958930b89d)) +* **api:** OpenAPI spec update via Stainless API ([30e1a06](https://github.com/cloudflare/cloudflare-python/commit/30e1a06a3dbd613a1ab782e003729b456f630404)) +* **api:** OpenAPI spec update via Stainless API ([741afd2](https://github.com/cloudflare/cloudflare-python/commit/741afd294103d244e6397c85d55214a957c1b406)) +* **api:** OpenAPI spec update via Stainless API ([a1b659c](https://github.com/cloudflare/cloudflare-python/commit/a1b659ca93641feef1b21e5ddc470672d55e7b6a)) +* **api:** OpenAPI spec update via Stainless API ([1c9534a](https://github.com/cloudflare/cloudflare-python/commit/1c9534a37a227e6c349246f2b93881c245047282)) +* **api:** OpenAPI spec update via Stainless API ([213c7f0](https://github.com/cloudflare/cloudflare-python/commit/213c7f0519da8b2f0aa373710644a44850dae529)) +* **api:** OpenAPI spec update via Stainless API ([d265388](https://github.com/cloudflare/cloudflare-python/commit/d265388717ce46986b3f3206e03a429ae1913a55)) +* **api:** OpenAPI spec update via Stainless API ([8aeb63a](https://github.com/cloudflare/cloudflare-python/commit/8aeb63a65033b430e2f045a404e8b672882e731d)) +* **api:** OpenAPI spec update via Stainless API ([2547a2e](https://github.com/cloudflare/cloudflare-python/commit/2547a2e132a6356b92a2699e4730c18130301986)) +* **api:** OpenAPI spec update via Stainless API ([f6f6db3](https://github.com/cloudflare/cloudflare-python/commit/f6f6db3d01e4975c0f04885855689545bcc062e0)) +* **api:** OpenAPI spec update via Stainless API ([598261d](https://github.com/cloudflare/cloudflare-python/commit/598261d7acb05e138ea288714f071cfb85aafb21)) +* **api:** OpenAPI spec update via Stainless API ([17ed0ff](https://github.com/cloudflare/cloudflare-python/commit/17ed0ff86a7946e20422fc4c591ced68543e213d)) +* **api:** OpenAPI spec update via Stainless API ([f026881](https://github.com/cloudflare/cloudflare-python/commit/f02688168e9ba3e5f70350e64d08d49dcbaef159)) +* **api:** OpenAPI spec update via Stainless API ([#1147](https://github.com/cloudflare/cloudflare-python/issues/1147)) ([de4e348](https://github.com/cloudflare/cloudflare-python/commit/de4e3480493c1a6da37373f8cb06df8dacfd0bfa)) +* **api:** OpenAPI spec update via Stainless API ([#1148](https://github.com/cloudflare/cloudflare-python/issues/1148)) ([9026ba1](https://github.com/cloudflare/cloudflare-python/commit/9026ba1317f96ce83986ee633f4587191f3236cb)) +* **api:** OpenAPI spec update via Stainless API ([#1149](https://github.com/cloudflare/cloudflare-python/issues/1149)) ([b017f04](https://github.com/cloudflare/cloudflare-python/commit/b017f04e5b811ef32173f45d6b4b3a3f0dd6a81a)) +* **api:** OpenAPI spec update via Stainless API ([#1150](https://github.com/cloudflare/cloudflare-python/issues/1150)) ([11218de](https://github.com/cloudflare/cloudflare-python/commit/11218de0b1ae274ce39d864e785f7ddbdd9499b3)) +* **api:** OpenAPI spec update via Stainless API ([#1152](https://github.com/cloudflare/cloudflare-python/issues/1152)) ([c2878bd](https://github.com/cloudflare/cloudflare-python/commit/c2878bdb2578de9990d0001f139656221c86e9de)) +* **api:** OpenAPI spec update via Stainless API ([#1155](https://github.com/cloudflare/cloudflare-python/issues/1155)) ([7706d48](https://github.com/cloudflare/cloudflare-python/commit/7706d48f3f1382e4a23a55a9e8819a8abb5ed075)) +* **api:** OpenAPI spec update via Stainless API ([#1156](https://github.com/cloudflare/cloudflare-python/issues/1156)) ([e71be01](https://github.com/cloudflare/cloudflare-python/commit/e71be01b47386d43e0555d2d029d03690237eca2)) +* **api:** OpenAPI spec update via Stainless API ([#1157](https://github.com/cloudflare/cloudflare-python/issues/1157)) ([d73518c](https://github.com/cloudflare/cloudflare-python/commit/d73518c7b75c6624d81971e7d206904d1638f3d8)) +* **api:** OpenAPI spec update via Stainless API ([#1158](https://github.com/cloudflare/cloudflare-python/issues/1158)) ([0dff80f](https://github.com/cloudflare/cloudflare-python/commit/0dff80f61429dec8114d4698c46cc946b366bf8d)) +* **api:** OpenAPI spec update via Stainless API ([#1160](https://github.com/cloudflare/cloudflare-python/issues/1160)) ([6031ae9](https://github.com/cloudflare/cloudflare-python/commit/6031ae93d9f3aa5468fa245161eee009d27ffcb5)) +* **api:** OpenAPI spec update via Stainless API ([#1161](https://github.com/cloudflare/cloudflare-python/issues/1161)) ([079cba5](https://github.com/cloudflare/cloudflare-python/commit/079cba58d11fdb9dfb0e3d48eba51ac6f294c1bd)) +* **api:** OpenAPI spec update via Stainless API ([#1162](https://github.com/cloudflare/cloudflare-python/issues/1162)) ([b25c6fc](https://github.com/cloudflare/cloudflare-python/commit/b25c6fc4490f193f833415491a67967b9617675f)) +* **api:** OpenAPI spec update via Stainless API ([#1163](https://github.com/cloudflare/cloudflare-python/issues/1163)) ([94c8879](https://github.com/cloudflare/cloudflare-python/commit/94c88793f635b0db08c46a2eedd7952dddd17c92)) +* **api:** OpenAPI spec update via Stainless API ([#1164](https://github.com/cloudflare/cloudflare-python/issues/1164)) ([37b2b79](https://github.com/cloudflare/cloudflare-python/commit/37b2b79102d869092b26403633d00459db7d4fd7)) +* **api:** OpenAPI spec update via Stainless API ([#1165](https://github.com/cloudflare/cloudflare-python/issues/1165)) ([6503a16](https://github.com/cloudflare/cloudflare-python/commit/6503a1689e3d9e2c47fd375320a7028972ece709)) +* **api:** OpenAPI spec update via Stainless API ([#1166](https://github.com/cloudflare/cloudflare-python/issues/1166)) ([3dcb89f](https://github.com/cloudflare/cloudflare-python/commit/3dcb89f67e0b9bbc8e58445fb4964f16761a6655)) +* **api:** OpenAPI spec update via Stainless API ([#1167](https://github.com/cloudflare/cloudflare-python/issues/1167)) ([316f72e](https://github.com/cloudflare/cloudflare-python/commit/316f72ed25fb5ac235d10528bed1b3cea884c6c1)) +* **api:** OpenAPI spec update via Stainless API ([#1168](https://github.com/cloudflare/cloudflare-python/issues/1168)) ([bce89eb](https://github.com/cloudflare/cloudflare-python/commit/bce89ebcd94cf8f27f1df383bb26fab80ece51df)) +* **api:** OpenAPI spec update via Stainless API ([#1170](https://github.com/cloudflare/cloudflare-python/issues/1170)) ([bcbde3c](https://github.com/cloudflare/cloudflare-python/commit/bcbde3c48acc8d07268bb51550b67273bad1b526)) +* **api:** OpenAPI spec update via Stainless API ([#1171](https://github.com/cloudflare/cloudflare-python/issues/1171)) ([49a3447](https://github.com/cloudflare/cloudflare-python/commit/49a344776c7654fd3448b241d886b359899820be)) +* **api:** OpenAPI spec update via Stainless API ([#1172](https://github.com/cloudflare/cloudflare-python/issues/1172)) ([2e661f0](https://github.com/cloudflare/cloudflare-python/commit/2e661f04b793428a79f6a1950216b152cf605a5b)) +* **api:** OpenAPI spec update via Stainless API ([#1173](https://github.com/cloudflare/cloudflare-python/issues/1173)) ([7805fde](https://github.com/cloudflare/cloudflare-python/commit/7805fde9b300a107b619ed44d58cd144575bf556)) +* **api:** OpenAPI spec update via Stainless API ([#1174](https://github.com/cloudflare/cloudflare-python/issues/1174)) ([62e392f](https://github.com/cloudflare/cloudflare-python/commit/62e392fc33d1bb8ad29cbe0bd871615f4e2229f5)) +* **api:** OpenAPI spec update via Stainless API ([#1175](https://github.com/cloudflare/cloudflare-python/issues/1175)) ([fa52697](https://github.com/cloudflare/cloudflare-python/commit/fa526975d0daedf8bda09bed1678a74a4f6f058b)) +* **api:** OpenAPI spec update via Stainless API ([#1176](https://github.com/cloudflare/cloudflare-python/issues/1176)) ([6a321d3](https://github.com/cloudflare/cloudflare-python/commit/6a321d34b825d9217d847be1ea56cf611defe111)) +* **api:** OpenAPI spec update via Stainless API ([#1177](https://github.com/cloudflare/cloudflare-python/issues/1177)) ([736ef7d](https://github.com/cloudflare/cloudflare-python/commit/736ef7dfbdbaf7c42ced3c702574142b02d006cd)) +* **api:** OpenAPI spec update via Stainless API ([#1179](https://github.com/cloudflare/cloudflare-python/issues/1179)) ([502c98c](https://github.com/cloudflare/cloudflare-python/commit/502c98c1a1499d454f98f388e5527540f0712002)) +* **api:** OpenAPI spec update via Stainless API ([#1183](https://github.com/cloudflare/cloudflare-python/issues/1183)) ([8fdc3df](https://github.com/cloudflare/cloudflare-python/commit/8fdc3df35e7920199ba257dcda0f804f997758cf)) +* **api:** OpenAPI spec update via Stainless API ([#1184](https://github.com/cloudflare/cloudflare-python/issues/1184)) ([bb95823](https://github.com/cloudflare/cloudflare-python/commit/bb958239243ec5bed89615884104cba1df4543e6)) +* **api:** OpenAPI spec update via Stainless API ([#1185](https://github.com/cloudflare/cloudflare-python/issues/1185)) ([7ae4e71](https://github.com/cloudflare/cloudflare-python/commit/7ae4e71c470086e80e8cb1d47d9536f20b1c6092)) +* **api:** OpenAPI spec update via Stainless API ([#1186](https://github.com/cloudflare/cloudflare-python/issues/1186)) ([84d7b0d](https://github.com/cloudflare/cloudflare-python/commit/84d7b0dc1a0d7ad3eade4ef567167f3cac827496)) +* **api:** OpenAPI spec update via Stainless API ([#1187](https://github.com/cloudflare/cloudflare-python/issues/1187)) ([1022f30](https://github.com/cloudflare/cloudflare-python/commit/1022f3066bf2e65457ef9a0d8f969f87a1e20b94)) +* **api:** OpenAPI spec update via Stainless API ([#1188](https://github.com/cloudflare/cloudflare-python/issues/1188)) ([90ce238](https://github.com/cloudflare/cloudflare-python/commit/90ce238bfabfc0182f8f8dabf5cbc9ae84a15c91)) +* **api:** OpenAPI spec update via Stainless API ([#1190](https://github.com/cloudflare/cloudflare-python/issues/1190)) ([a2955c5](https://github.com/cloudflare/cloudflare-python/commit/a2955c5da1ec6e6a0d6205c6bc33e19040fb98d5)) +* **api:** OpenAPI spec update via Stainless API ([#1191](https://github.com/cloudflare/cloudflare-python/issues/1191)) ([d3e0648](https://github.com/cloudflare/cloudflare-python/commit/d3e0648ee12e9cf442de7c58e29cc5bfe5ec8abe)) +* **api:** OpenAPI spec update via Stainless API ([#1192](https://github.com/cloudflare/cloudflare-python/issues/1192)) ([8ea5be2](https://github.com/cloudflare/cloudflare-python/commit/8ea5be246f8471bc252df1dd431c45bc428d08b5)) +* **api:** OpenAPI spec update via Stainless API ([#1193](https://github.com/cloudflare/cloudflare-python/issues/1193)) ([0bfa95a](https://github.com/cloudflare/cloudflare-python/commit/0bfa95acf64fa8b6682388cad93e04062ffface1)) +* **api:** update via SDK Studio ([c309481](https://github.com/cloudflare/cloudflare-python/commit/c309481bf9454776b16a1c6ab666aa73f1a13d7c)) +* **api:** update via SDK Studio ([fd61b0d](https://github.com/cloudflare/cloudflare-python/commit/fd61b0dd320d0bd6f93ed03783a739ee0145629b)) +* **api:** update via SDK Studio ([6f848ba](https://github.com/cloudflare/cloudflare-python/commit/6f848ba0bea1a6d62115be64580ef67e8bd784b0)) +* **api:** update via SDK Studio ([#1146](https://github.com/cloudflare/cloudflare-python/issues/1146)) ([4fc1453](https://github.com/cloudflare/cloudflare-python/commit/4fc14538dc45b58059a84eb89afa4013be4fb0ff)) +* **api:** update via SDK Studio ([#1154](https://github.com/cloudflare/cloudflare-python/issues/1154)) ([129fdd8](https://github.com/cloudflare/cloudflare-python/commit/129fdd8333e094f979ec6a2f07517fe5aaff4003)) +* **api:** update via SDK Studio ([#1159](https://github.com/cloudflare/cloudflare-python/issues/1159)) ([32214d9](https://github.com/cloudflare/cloudflare-python/commit/32214d9a3c32aa2a5ecad1eb9328dcd8c1343fce)) +* **api:** update via SDK Studio ([#1180](https://github.com/cloudflare/cloudflare-python/issues/1180)) ([d0a6c8a](https://github.com/cloudflare/cloudflare-python/commit/d0a6c8a7683be5b2b0110f761ad47f8fb6b7d9fc)) +* **api:** update via SDK Studio ([#1181](https://github.com/cloudflare/cloudflare-python/issues/1181)) ([efafb96](https://github.com/cloudflare/cloudflare-python/commit/efafb96456cbf3314ab93dfb3dbf71d554a77eec)) +* **api:** update via SDK Studio ([#1182](https://github.com/cloudflare/cloudflare-python/issues/1182)) ([41a8d22](https://github.com/cloudflare/cloudflare-python/commit/41a8d2246f92dcafba6a7f728ed21bdf354cd508)) +* **api:** update via SDK Studio ([#1189](https://github.com/cloudflare/cloudflare-python/issues/1189)) ([cf972bb](https://github.com/cloudflare/cloudflare-python/commit/cf972bbbe25203a42bfc9f9b6c80a0aac64a30dc)) + ## 3.0.1 (2024-06-24) Full Changelog: [v3.0.0...v3.0.1](https://github.com/cloudflare/cloudflare-python/compare/v3.0.0...v3.0.1) diff --git a/pyproject.toml b/pyproject.toml index 6a5b6dbdd32..d8f5ee3101f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cloudflare" -version = "3.0.1" +version = "3.1.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 3595cc453c3..8567a89a5c0 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.1" # x-release-please-version +__version__ = "3.1.0" # x-release-please-version pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy